![]() |
| ||
| Function Problem. Please help This one isnt working! function insertpath($num){But this one Works echo " <td colspan=\"3\" align=\"left\"> <br>\n"; Well not woking in the sense the values of variables ($Date_Added[$num],$Sample_Views[$num]) not coming in the first. Whil in second its working! Help me :( |
| ||
| Re: Function Problem. Please help There are two things you need to do to troubleshoot this problem. INSIDE your function, at the very top, do this: First, echo out one of the arrays like this: [PHP] echo "<pre>"; print_r($Date_Added); echo "</pre>"; [/PHP] Then echo out the value of $num: [PHP] echo "<hr />".$num; [/PHP] You should see that $num = 0, but that your array does not even exist. You forgot one important line at the top of your function: [PHP] global $Date_Added, $Sample_Views; [/PHP] |
| ||
| Re: Function Problem. Please help Maybe concat syntax error :o THIS.... echo "<b>Sample</b>:",$Sample_Views[$num],"</td>\n"; SHOULD BE THIS.... echo "<b>Sample</b>:".$Sample_Views[$num]."</td>\n"; |
| All times are GMT -4. The time now is 11:09 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC