php - Continue not going to loop start -
I'm having trouble understanding this bug. Here's the code:
function filter_optionsfordash (array $ data, $ dash) {$ filtered_options = array (); $ Lane = stellen ($ dash); Foreign currency ($ k = $ value as $ data) {if (substr ($ k, 0, $ len) === $ dash) {$ option_name = trim (str_replace ($ dash. '_' , '', $ T)); Switch ($ option_name) {case 'displayColumns': $ value = explosion (',', $ value); break; Case 'DesleteTit': $ option_name = 'title'; break; Case 'ID': Case 'Module': Case 'Action': Case 'Configure': Case 'to_pdf': Continue; break; } $ Filtered_options [$ option_name] = $ value; }} Return $ Filtered_options; }
What I'm trying to do here is to filter some values from the array (in this case it will be $ _ POST
) given Name ( $ dash
), but I want to filter people with 'id', 'module', 'action', 'configure' or 'to_pdf'.
So the work I thought was 'continuing' because the switch statement is not a loop, so 'release' should go to the beginning of the loop (foreign currency), but apparently it does not happen . I still get the key name that I do not want in the array.
I got the code by solving a bit, but I really want to understand why it does not work.
'Release' should send me to the predecessor!
say:
to leave the current loop encoding inside the looping structure Is used [note ...] Note: Switch Statement in PHP is considered for the purpose of looping structure.
Comments
Post a Comment