euroiplayer Posted December 8, 2006 Share Posted December 8, 2006 Hello,I need help with a line, I can't get it to show all the extensions instead of listing them one by one.This is the code where you list all the file extensions which you want to be visible:[quote][url=http://firlas722.100webspace.net/source0284.txt]http://firlas722.100webspace.net/source0284.txt[/url]Line 14: $show_extensions = array( 'php' , 'htm' , 'html' , 'shtm' , 'shtml' , 'jpg' , 'jpeg' );[/quote]Can anybody help me with this?Thanks Link to comment https://forums.phpfreaks.com/topic/29922-show-extensions/ Share on other sites More sharing options...
kenrbnsn Posted December 8, 2006 Share Posted December 8, 2006 That line is fine as it stands. What is the context? How are you using it? Please tell us your problem in more detail.Ken Link to comment https://forums.phpfreaks.com/topic/29922-show-extensions/#findComment-137467 Share on other sites More sharing options...
taith Posted December 8, 2006 Share Posted December 8, 2006 that'll show ya all the array in one string[code]$show_extensions = array( 'php' , 'htm' , 'html' , 'shtm' , 'shtml' , 'jpg' , 'jpeg' );$show_extensions = implode(", ", $show_extensions);echo $show_extensions;[/code] Link to comment https://forums.phpfreaks.com/topic/29922-show-extensions/#findComment-137469 Share on other sites More sharing options...
euroiplayer Posted December 9, 2006 Author Share Posted December 9, 2006 Here is the source code for those of you that want to view it.[quote]http://firlas722.100webspace.net/source0284.txtLine 14: $show_extensions = array( 'php' , 'php3' , 'htm' , 'html' , 'shtm' , 'shtml' , 'jpg' , 'jpeg' , 'png' , 'gif' , 'js' );[/quote]I would like Line 14 to view all files with all the type of extensions, not where I have to list them one by one.Thanks Link to comment https://forums.phpfreaks.com/topic/29922-show-extensions/#findComment-137815 Share on other sites More sharing options...
euroiplayer Posted December 9, 2006 Author Share Posted December 9, 2006 I found a solution, here it is:$show_extensions = array( '.*' );That will show all file extensions. Link to comment https://forums.phpfreaks.com/topic/29922-show-extensions/#findComment-137883 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.