PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $source = "2022-02/1522348990_voskedproc.jpg|124|700x394|104 Kb"; $chunks = explode('|', $source); $path = $chunks[0]; echo $path; echo PHP_EOL; preg_match('/^([^\|]+)\|/', $source, $path); echo $path[1]; echo PHP_EOL; echo substr($source, 0, strpos($source, '|'));
Show:  
Copy Clear