I have a piece of code here that fetches a URL based on a portfolio catagory.
In this case the url of every link will be /portfolio/"$portfolio_item name"
foreach($page_photo_arr as $key => $portfolio_item)
{
$image_url = '';
I'd like to make an exception to this rule in a couple of cases. I'm not sure what the correct syntax would be.
foreach($page_photo_arr as $key => $portfolio_item)
if ($key === 'home') {
$url = 'the new url';
}else {
This is what I've tried, it makes sense to me but it isn't working.
Any help would be appreciated. Thanks.


Sign In
Create Account

Back to top









