networkthis Posted September 13, 2008 Share Posted September 13, 2008 There must be an easier way to do this??? I am basically trying to create a list of folder names that I don't want to be deleted. Is there a way to do this that would be more simple? This part of the code can become very large very quick with many folder names.......... Your help is greatly appreciated. <?php if($stripFolderName == "foder1" || $stripFolder == "folder2" || $stripFolder == "folder3") { echo "You do not have permission to Remove this folder"; } ?> Link to comment https://forums.phpfreaks.com/topic/124076-solved-trying-to-find-an-easier-way/ Share on other sites More sharing options...
DarkWater Posted September 13, 2008 Share Posted September 13, 2008 <?php $blacklist = array('somefolder', 'folder6', 'dev', 'supersecret'); if (in_array($stripFolderName, $blacklist)) { //bad! } Link to comment https://forums.phpfreaks.com/topic/124076-solved-trying-to-find-an-easier-way/#findComment-640586 Share on other sites More sharing options...
networkthis Posted September 13, 2008 Author Share Posted September 13, 2008 Thans darkwater that is exactly what I was trying to do Link to comment https://forums.phpfreaks.com/topic/124076-solved-trying-to-find-an-easier-way/#findComment-640591 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.