php help needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zalka
    Confirmed User
    • Nov 2006
    • 168

    #1

    php help needed

    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.

    Dump Your Site Here
    Sexyads 50/50 Revshare TotemCash 50/50 Revshare
    $40 per signup Adultdating Dollars
    Moocash.com Hottest Amateur Cam Action

  • Nookster
    Confirmed IT Professional
    • Nov 2005
    • 3744

    #2
    Originally posted by zalka
    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, 11:08 AM.
    The Best Affiliate Software, Ever.

    Comment

    Working...