| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: May 2005 Location: Ontario Canada
Posts: 3,088
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | whats wrong here? [php] hey i am not getting an error..it just doesnt show anything when it should PHP Code: PHP Code:
__________________ |
| |
| | #3 (permalink) |
| Senior Member Join Date: Dec 2006 Location: England
Posts: 1,565
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | EDIT: I didn't notice before. Change: PHP Code: PHP Code: Possible Shorty but since he did not supply the second argument when using the function it should have been -1 by default. By it could be ![]() Run this: PHP Code: As a side note it does not matter in this case however you do not use '' for numerical array keys.
Last edited by Matthew.; 01-14-2007 at 05:51 AM.
|
| |
| | #5 (permalink) | ||||
| Senior Member Join Date: Dec 2006 Location: England
Posts: 1,565
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I tried a little experiment since i didn't know 100% if it was the problem but: PHP Code: PHP Code: | ||||
| |
| | #6 (permalink) |
| Senior Member Join Date: May 2006
Posts: 1,327
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Here i rewrote a little your code. Hope it works ![]() If it's not working then you might have problems with your the mysql class that you are using. ????: NamePros.com http://www.namepros.com/showthread.php?t=281056 PHP Code: |
| |
| | #7 (permalink) |
| Buy my domains. Join Date: Feb 2006
Posts: 2,792
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | If you change if($test == true) to if($test === true) it will run just return $string; I can't figure out why it makes it return 1.. "void exit ( [string status] )" Ahtum, you need to have it get the row inside of the for loop to get all of the rows. What you did would only get one. |
| |
| | #10 (permalink) | ||||
| Senior Member Join Date: Dec 2006 Location: England
Posts: 1,565
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The conditional is irrelevant, it was just to make it easier to swap between the 2 (I'm bored gimme a break.)????: NamePros.com http://www.namepros.com/showthread.php?t=281056 PHP Code: I'm determined to find out why it returns 1... | ||||
| |
| | #11 (permalink) | ||||
| Professional Monkey Join Date: Jul 2005 Location: Escaped from the zoo
Posts: 907
![]() ![]() |
in other words return $somestring or die("some message") is a pointless line of code
__________________ Webmaster Words | ||||
| |
| | #12 (permalink) | ||||
| Senior Member Join Date: Dec 2006 Location: England
Posts: 1,565
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() My point/query was why it returns 1 It is not important, merely something i was wondering | ||||
| |