Jump to content

[SOLVED] Strip "-" out of file name?


ballhogjoni

Recommended Posts

Would that work in this array?

 

<?php
$noshow = array('add_edit_cards.php','config.php','index.php','bottom_content.php');
echo "<table align=\"center\"><tr><td align=\"center\">";
foreach (glob("*.php") as $filename) {
if (in_array($filename,$noshow)) {
	continue;
}
echo "<a href=\"$PHP_SELF/articles/credit_repair/$filename\">".substr($filename,0,strlen($filename)-4)."</a> | ";
}
echo "</td></tr></table>";
?>

<?php
$noshow = array('add_edit_cards.php','config.php','index.php','bottom_content.php');
echo "<table align=\"center\"><tr><td align=\"center\">";
foreach (glob("*.php") as $filename) {
if (in_array($filename,$noshow)) {
	continue;
}
$filename = str_replace('-',' ', $filename);
echo "<a href=\"$PHP_SELF/articles/credit_repair/$filename\">".substr($filename,0,strlen($filename)-4)."</a> | ";
}
echo "</td></tr></table>";
?>

 

EDIT: heh, beaten to it ^

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.