Changing string to array
Posted: Sun Sep 05, 2004 2:15 am
Hi
Could someone tell me in laymans language how I can turn this string
Into an array?
As when I execute the script it is in I get the following error message
Dave
Could someone tell me in laymans language how I can turn this string
Code: Select all
<?php
$catid = array_shift(mysql_fetch_row(mysql_query("select id from lma_categories where parent = '$ipar' and name = '".str_replace("_", " ", $lastcat)."'")));
?>As when I execute the script it is in I get the following error message
Many thanksWarning: array_shift() [function.array-shift]: The argument should be an array in /home3/davemcc/public_html/1coolwebsite.co.uk/lma/directory on line 774
Dave