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