ok guys, in every page of my site url would be something like c404s0.html where c and s elements dont change. i can find the name of the script with php, but how can i learn what is the number between c and s to show an appropriate banner? so the issue is to find the numbers bettween c s in page url. thank you very much.
Not the most efficient way but it will work:
$domain = c404s0.html;
$afterc = strstr ($domain, 'c'); $explode_s = explode('s', $afterc); $formatted = $explode_s[0];
echo $formatted;
I spoke to soon. The above code includes the 'c'. This one doesn't:
<?php $domain = c404s0.html;
$afterc = substr ( (strstr ($domain, 'c')),0, -1); $explode_s = explode('s', $afterc); $formatted = $explode_s[0];
echo $formatted; ?>