Very quick PHP qu

Noob?

OH YES! :D

Basically, I just silenced the error.... num(); was annoying me as it was dictating that I needed to specifiy more than the one variable - when I had! RAGE.
 
jdickerson said:
Noob?

OH YES! :D

Basically, I just silenced the error.... num(); was annoying me as it was dictating that I needed to specifiy more than the one variable - when I had! RAGE.
You shouldn't need to silence the error. Fix the error, don't sweep it under the carpet. :)
 
Dj_Jestar said:
You shouldn't need to silence the error. Fix the error, don't sweep it under the carpet. :)

Shhhhhh! I can't think why though. min() only needs the one variable if it is an array... and if it gives me the right and expected output why not just silence it a? heh.
 
because it still generates the error, and the extra processing time associated with it.

Code:
<?php

echo min((array) $val);

?>

problem solved.
 
Back
Top Bottom