Comment est-ce que je preg_replace .php de fin de chaîne?preg_replace ".php"?
for ($x = 0; $x < count($sidebar_links); $x++) {
$sidebar[$x] = $x;
}
sidebar_links $:
array(3) { [0]=> string(9) "index.php" [1]=> string(9) "site2.php" [2]=> string(7) "site3.php" }
vous pouvez utiliser simple str_replace –