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 Quote Link to comment 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 Quote Link to comment 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] Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.