initialize an array with dummy values
<pre><code> while ($row = mysql_fetch_object($result)) {
    $data[] = $row;
    echo "&lt;div id='captionbox' style='width: 110px;float:left;color:#FFF;text-align:center;'&gt;";
        echo "&lt;a href='#' class='thumb'&gt;&lt;img class='thumb-img' value = ".$row-&gt;aid." onclick='getVote(".$row-&gt;aid.", \"".$row-&gt;atitle."\")' src='images/roadies/th".$row-&gt;aid.".jpg' /&gt; &lt;/a&gt;";
    echo "&lt;input  type = hidden name = aid id = rd".$row-&gt;aid." value = ".$row-&gt;aid."&gt;".$row-&gt;atitle."&lt;/input&gt;";
    echo "&lt;/div&gt;";
    }

    $jsfriend = json_encode($data);
</code></pre>

<p>In the above PHP code, I am adding the mysql rows into an array $data. then i am making a JSON object from that array. before I come into the while loop I want to create the array $data and initialize the $data[0] pointer with dummy values as I do not want to use the [0] pointer values. can this be done?</p>

<p>I hope I am making sense.   </p>
