[Code Parcel]
  • Home
  • Snippets
  • Become a Contributor
  • Find Instagram User ID
  • Login
  • Contact
  • Loggin to your account
lkSuperboy
Posted on: 3 years ago
PHP

split a string in php with space

php split string along spaces


                                          // Example 1
$pizza  = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
echo $pieces[0]; // piece1
echo $pieces[1]; // piece2                                          
Views: 40
Favorite0
Subscribe
Login
Notify of
Please login to comment
0 Discussions
Inline Feedbacks
View all comments

Related Snippets

Woocommerce products from category loop

PHPWordpress

Woocommerce page filter by ACF Field – GET Method

PHPWordpress

Using WP_Query with Custom Post Types

PHPWordpress

Looping through WooCommerce categories

PHPWordpress

How to Use WP_Query to Display Custom Post Type

PHPWordpress

How to get Woocommerce Product Gallery image URLs?

PHPWordpress

How to fix pagination for custom loops?

PHPWordpress

How force custom template file to a post type

PHPWordpress

Gravity form shortcode

PHPWordpress

get_the_post_thumbnail_url() | Function

PHPWordpress

CSS – Split Color Background

CSS

Add multiple images to WooCommerce product

PHPWordpress

© Reserved [Code Parcel] 2022

Login

Register

Forgotten Password?

Register | Lost your password?
| Back to Login
wpDiscuz