See explode
// Example 1
$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
echo $pieces[0]; // piece1
echo $pieces[1]; // piece2
More Related Contents:
- If number have inside number string [closed]
- How to execute a line of code once?
- php – Should I call exit() after calling Location: header?
- How can I update code that uses the deprecated each() function?
- How to push both value and key into PHP array
- json_encode() escaping forward slashes
- WooCommerce action hooks and overriding templates
- What is the “->” PHP operator called? [closed]
- How can I add a PHP page to WordPress?
- Laravel Check If Related Model Exists
- Sort and display directory list alphabetically using opendir() in php
- Reconstruct / get source code of a PHP function
- Explode a string to associative array without using loops? [duplicate]
- Fix Access denied for user ‘root’@’localhost’ for phpMyAdmin
- php curl: I need a simple post request and retrival of page example
- Submitting JSON data via JQuery ajax.post to PHP
- Ajax push system
- unpacking an array of arguments in php
- What are .tpl files? PHP, web design
- Get the first letter of each word in a string
- php:Store image into Mysql blob, Good or bad?
- Detect main colors in an image with PHP
- Merge two 2d arrays by shared column value
- php/symfony/doctrine memory leak?
- is_null($x) vs $x === null in PHP [duplicate]
- Can PHP detect if its run from a cron job or from the command line?
- Detect if cookies are enabled in PHP
- How can I read XMP data from a JPG with PHP?
- json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT
- Increasing PHP memory_limit. At what point does it become insane?