I'm trying to clone a site that's currently live on my local server and I'm getting some PHP Notice on my localhost error log. I understand why that warnings but what I cannot understand is why it's working on the server so I guess it's related with the PHP version. Thise are the exact warning:
PHP Notice: Undefined variable: value PHP Notice: Undefined variable: url
And this is the code:
<?
$catdata=$catobj->getallCategory();
$temp=1;
foreach($catdata as $value){
$search = array(' ','!','?','"','(',')',' ','&',',','/');
$replace = array('-',' ',' ',' ','','','-','-','','-');
$sub_title=str_replace($search, $replace, strtolower(trim($value['cat_title'])));
$url="jobs-in-".str_replace(' ','-',stripslashes($sub_title));
?>
<? if(count($catdata)==$temp){?>
<li style="background:none; padding-right:0"><a href="<?=$this->baseUrl()?>/<?=$url?>"><?=ucwords(stripslashes($value[cat_title]))?></a></li>
<? }else{?>
<li><a href="<?=$this->baseUrl()?>/<?=$url?>"><?=ucwords(stripslashes($value[cat_title]))?></a></li>