1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Javascript Array In PHP

Discussion in 'PHP' started by deeksha, Nov 12, 2009.

  1. #1
    I want to create a single javascript array to be used on the client side in PHP as shown in the code:
    <?

    while($row=mysql_fetch_array($result))
    {
    list($width, $height, $type, $attr) = getimagesize($row[photoPath]);
    if(($width < 600) && ($height <= 900))
    {
    for ($i; $i<=1; $i++)
    {

    echo "show image";


    }
    echo "show image ";
    //Value for javascript array row will come here
    }
    else
    {
    for ($i; $i<=1; $i++)
    {

    echo "show image";

    }
    echo "show image";

    //Value for javascript array row will come here

    }


    }
    echo("</td>");
    echo("</tr>");
    echo("<table>");


    ?>

    Any help will be appreciated

    Thanks,
    Srinivas
     
    deeksha, Nov 12, 2009 IP