Hello I have this variable in php with data but in some pages I don't have it defined so I need to replace it with some data but my code doesn't work.
$item->restaurant->name
Try with:
$item->item_category->name = "Mi content replace";
But it does not work. What am I doing wrong? Thanks