PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$catid = array_shift(mysql_fetch_row(mysql_query("select id from lma_categories where parent = '$ipar' and name = '".str_replace("_", " ", $lastcat)."'")));
?>
Into an array?
As when I execute the script it is in I get the following error message
Warning: array_shift() [function.array-shift]: The argument should be an array in /home3/davemcc/public_html/1coolwebsite.co.uk/lma/directory on line 774
break the line apart into individual function calls. Although it can be fun to compact code into the smallest space, it is counter productive when still learning and developing. You likely have an error in the sql or maybe the query found zero records.