PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $org = "Apple $1200 iMac $1400 Desktop (Description Text) (Description Text)"; $keywords = preg_split("/[($|€|£)]+/", $org); print_r($keywords); $separator = "1"; $resultArray = explode ($separator, $org); extract ($resultArray); preg_match('/^(.+?)\s+(\$[^(]+?)\s+(\(.*\))/', $org, $match); $brand = $match[1]; $price_products = $match[2]; $all_descriptions = $match[3]; print_r($match); preg_match_all('/(\$\d+)\s+([^$]+)/', $price_products, $matches, PREG_PATTERN_ORDER); $prices = $matches[1]; $products = $matches[2]; print_r($matches); preg_match_all('/\([^)]+\)/', $all_descriptions, $matches, PREG_PATTERN_ORDER); $descriptions = $matches[1];
Show:  
Copy Clear