var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
(PHP) Notice: Use of undefined constant
I'm a noob here, reading through SAMs PHP & MySQL Web Development. I can't get around this problem.
I'ts supposed to sort the arrays inside $products
$products = array( array("TIR", "Tires", 100),
array( "OIL", "Oil", 10),
array( "SPK", "Spark Plugs", 4));
function compare($x, $y)
if ( $x == $y )
else if ( $x < $y )
Notice: Use of undefined constant compare - assumed 'compare' in C:\Inetpub\wwwroot\PHP\usort.php on line 16
Change to usort($products, 'compare');
Any string not encapsulated in quotes is considered a constant, and that message is just a Notice telling you that PHP thinks compare is a constant, but its not defined anywhere.
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise
That did the trick, thanks fyre!