- var_dump: documentation ( source)
- strpos: documentation ( source)
- preg_replace: documentation ( source)
<?php
$matches=null;
$fortune = 'The rain in Spain<br> -- whoknows?';
if (strpos($fortune,"--") !== FALSE) {
preg_replace("/(--[ a-zA-Z]+)/m","<p style='text-align:right'>$1</p>",$matches);
var_dump($matches);
}