Re: PHP/MySql noob falls at first hurdle
| From: | Rory McKinley | Date: | Fri, 09 Dec 2005 15:27:53 +0000 |
| Subject: | Re: PHP/MySql noob falls at first hurdle | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-227203@lists.php.net to get a copy of this message | ||
Paul Jinks wrote:
> Rory McKinley wrote:
>
>> Paul Jinks wrote:
>> <snip>
>>
>>> <?
>>> while($ouput_row = mysql_fetch_array($result)) {
>>> ?>
>>> <?=$output_row["projTitle"]?><br />
>>
>>
>> <snip>
>>
>>
>> Paul - is this the actual code that you are using? - because you have a
>> typo in your while statement - $ouput_row instead of $output_row - means
>> that when you try and echo $output_row it doesn't exist!
>>
>> Rory
>>
>>
> Oh no. I can't believe it. That was it. An idiotic typo.
<snip>
I wouldn't stress too much - happens to me all the time (sigh) and
(apparently) it happens to the best of us - but I am not qualified to
comment on the veracity of that statement :).
For future reference, during testing, you can set your error reporting
levels ( i think) in php.ini to output a notice regarding a variable
that does not exist - would have helped you spot the error! I normally
use the Zend debugger which does quite a good job of telling me that I
am an idiot :)
Rory