# (PHP) Simple Array Question... please help!

**URL:** <https://forum.kirupa.com/t/php-simple-array-question-please-help/88380>\
**Category:** programming\
**Created:** [April 28, 2005, 7:30pm UTC](https://forum.kirupa.com/t/php-simple-array-question-please-help/88380 "2005-04-28T19:30:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![th3Phallex](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@th3Phallex](https://forum.kirupa.com/u/th3Phallex)\
**Post date:** [April 28, 2005, 7:30pm UTC](https://forum.kirupa.com/t/php-simple-array-question-please-help/88380/1 "2005-04-28T19:30:31Z")

</div>

I was confused on how to do this:

I have a database.

I know how to display all of the records.

```php

if(mysql_num_rows($result)) { 
 
while($myRow = mysql_fetch_row($result)){			 
 
$eventTitle = $myRow[0];
$eventDate = $myRow[1];
 
blah, blah, blah.....
 
echo $eventTitle."<br>
";
echo $eventDate."<br>
"
 
}
 
}

```

As you know, each DataBase RECORD has it’s own fields. Let’s say mine has 3.

ex:  
**Record 1**  
[Field 1] [Field 2] [Field 3]

**Record 2**  
[Field 1] [Field 2] [Field 3]  
etc…

So the data would be:  
**Record 1**  
[Meeting 1] [2005/04/01] [Conference Room]

**Record 2**  
[Meeting 2] [2005/04/30] [Staff Room]  
etc…

* * *

How would I have a string split into an array, with only the “Date” field from EACH Record in it??

(I am looking to do this dynamically, without physically inputting the dates myself…)

ex:

```php

$myDatesArray =
 
// the array above would have this in it:
 
("2005/04/01","2005/04/30", etc...)

```
