PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE menu (`mid` int, `parent` varchar(4), `org` int, `item` varchar(8), `price` varchar(3)) ; INSERT INTO menu (`mid`, `parent`, `org`, `item`, `price`) VALUES (1, NULL, 1, 'Category', '1'), (2, '1', 1, 'Item 1', '$10'), (3, '1', 1, 'Item 2', '$12'), (4, NULL, 1, 'Category', '2'), (5, '4', 1, 'Item 3', '$12'), (6, '4', 1, 'Item 4', '$90') ;
Copy Clear
Copy Format Clear
<?php // split the phrase by any number of commas or space characters, // which include " ", \r, \t, \n and \f $keywords = preg_split("/+[(,]/", "Computers $1200 iMac +$100 500GB SSD +$200 1TB SSD (Description Text for iMac) (Description Text for iMac)"); print_r($keywords); ?>
Show:  
Copy Clear