# Problem Array

**URL:** <https://forum.kirupa.com/t/problem-array/209638>\
**Category:** programming\
**Created:** [December 11, 2006, 3:09am UTC](https://forum.kirupa.com/t/problem-array/209638 "2006-12-11T03:09:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![james182](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@james182](https://forum.kirupa.com/u/james182)\
**Post date:** [December 11, 2006, 3:09am UTC](https://forum.kirupa.com/t/problem-array/209638/1 "2006-12-11T03:09:03Z")

</div>

Whats happened?? it doesn’t output the numbers correctly it should look like this:  
pausecontent[0]=» title1  
pausecontent[1]=» title2  
pausecontent[2]=» title3

NOT this:  
pausecontent[0]=» title1  
pausecontent[0]=» title2  
pausecontent[0]=» title3

```php

<?
include ("connect.php");
$result = mysql_query("select * from news ");
$count = mysql_num_rows($result);

for ( $i=0; $i <= $count; $i++) {
    while($r=mysql_fetch_array($result)){
        $title=$r["title"];
        $blurb=$r["blurb"];
        $nid=$r["nid"];
    
        echo "pausecontent[$i]=<span class='title'>&raquo; $title<br></span><span class='date'>$date<br></span><span class='content'>$blurb<br><br></span>";
    }
}
?>

```
