Jump to content

array help needed


spires

Recommended Posts

Hi

 

I'm trying to separate each line of a text filed and place each line in to an array one by one.

At the moment i'm just trying get echo out the count of how many items a are in the array $expKey;

 

When entering the words in the text field, i'm pressing return to move doen to the next line.

I'm adding 4 lines of text. So, the count should be 4.  Or am I missing something?

 

 

         $expKey = explode("/n", $_POST['keywords']);
 echo  count($expKey). '  ';

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/238988-array-help-needed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.