I have table :
==============
|id| document|
==============
|1 | doc1.txt|
|2 | doc2.txt|
==============
I wanna get the document
without the extension. here's my code :
$query = mysql_query("SELECT document FROM tb ") or die(mysql_error());
while ($row = mysql_fetch_array($query)) {
$filename = $row['document'];
$title = basename($filename);
}
But the rsult of $title
still contain the extension. what's wrong? thank you