Thread: php help needed
View Single Post
Old 07-26-2008, 12:07 PM  
Nookster
Confirmed IT Professional
 
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
Quote:
Originally Posted by zalka View Post
Hi guys i need your help on some coding, on one of my sites the left side bar consists of several what they call boxes all written in php, i contacted the webmaster who wrote the script and asked him that i would like to add a extra box to my left column and he sent me the following code but i cant get it to work, he says it is correct but i would like a second opinion here it is:-

<tr> <td>
<?php $info_box_contents = array();
$info_box_contents[] = array('text' =>
'&nbsp;
Your Box Title Here
');
new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '
your box html here
') new infoBox($info_box_contents);?> </td> </tr>

Can you see any mistakes?
Thanks in advance.
Well, the first "problem" I notice is there is no container for the "infoBoxHeading" class (I'm guessing it's a class by the use of the "new" keyword.) Big problem because there is no reference to the class or object itself. The second thing I notice which is pretty much just redundant coding is the first line reading "$info_box_contents = array()". You'll notice the line immediately after executes the same code...unless they were going for a multi-dimensional array. And finally, the last line has the same problem as my first tiff.
I can't help any more without seeing the full classes.

Last edited by Nookster; 07-26-2008 at 12:08 PM..
Nookster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook