PHP ver gevorderde |
|
<?php
$String = 'homepage<category>';
list($SelectedCategory, $OtherString) = explode('<', $String);
$OtherString = '<'.$OtherString;
?>
<?php $String = 'homepage<category>'; list($SelectedCategory, $OtherString) = explode('<', $String); $OtherString = '<'.$OtherString; ?>
of
<?php
$String = 'homepage<category>';
$iPos = strpos($String, '<');
$SelectedCategory = substr($String, $iPos);
$OtherString = substr($String, 0, $iPos);
?>
<?php $String = 'homepage<category>'; $SelectedCategory = substr($String, $iPos); $OtherString = substr($String, 0, $iPos); ?>
|