Home - Sitemap
How do you change link text with PHP?
Hey Tabble,
this might be for you:
<?php
$input = array (
'rolling_stones-paint_it_black',
'led_zeppelin-kashmir',
'pink_floyd-comfortably_numb',
);
foreach ($input as $in) {
$success = preg_match('/-(.*)/', $in, $matches);
$song = $matches[1];
$words = explode('_', $song);
foreach ($words as $word) {
$newWords[] = ucfirst($word);
}
$result = join(' ', $newWords);
unset($newWords);
printf("%s
", $result);
}
?>
It's not the fastest way, but it works.
To include 'Tab', just change the printf:
printf("%s Tab", $result);
Copyright 2008, All Rights Reserved. Thanks for visiting a
Performance Marketing Group Network Website. Advertise Here. Get A Free Link. Please visit one
of our other quality websites.: