Search Results

Search found 1 results on 1 pages for 'mumis2012'.

Page 1/1 | 1 

  • php explode() delimiter issue

    - by mumis2012
    I am new to php so this may be a simple fix. I have a text file named 'textt.txt' that looks like this: South East asia,2222,code1 winter break,3333,code2 my php code looks like this: <?php $x = file_get_contents('textt.txt'); $y = explode("\r\n", $x); $z = $y[0]; echo $z; ?> the outcome of this is: South East asia,2222,code1 I would like it to return only: South East Asia. How can I make this happen? Thanks!

    Read the article

1