explode a string into an array

This uses the php explode function to split a string into an array based on a delimiter character. I always forget which order this goes in.


// basic usage
explode ( string $separator , string $string );

// example
$my_string = "search_term:::some%20text%20string";
$my_string_array = explode ( ":::" , $my_string );

// result
array(2) { [0]=> string(11) "search_term" [1]=> string(20) "some%20text%20string" }

Other Items in php
Related Search Terms
Page Views

This page has been viewed 42 times.

Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.


Random Quote
Our brains are wired to find things we are looking for - if your always cynical or waiting for things to go wrong, then your life will reflect that. On the other hand, having a positive outlook on life will bring you joy and provide you with inspiration when you least expect it ☀ïļðŸ‰ðŸŒī