Reputation: 3
I am modifying an old question, not sure if this is the right way.
This is the code I have
Array ( [0] => Gymnasium [1] => Mini market [2] => Jogging track )
What I need to do is search inside the above array for specific value and then check the checkbox accordingly.
I tried this
<input type="checkbox" id="facilities1" value="Swimming pool" name="et_er_facilities[]" <?php if (in_array('Swimming pool', $et_er_facilities)) {?>checked="checked"<?php }?>>
<input type="checkbox" id="facilities2" value="Gymnasium" name="et_er_facilities[]" <?php if (in_array('Gymnasium', $et_er_facilities)) {?>checked="checked"<?php }?>>
So the idea is to mark the checkbox if the value is present in the above array and that array is going to have more values instead of those 3 I listed as sample.
The problem I am having is it only marks the checkbox if it matches the first value. ie;
if array has Gymnasium value in it and its on first index, it will mark it. However if the 2nd indexed value is also matching but it won't mark any of them after the first one.
Please help.
thanks
Upvotes: 0
Views: 76
Reputation: 4976
RewriteEngine on
RewriteBase /
# Makes sure existing files and directories are not rewritten
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrites /video/2394943asdfsd0323 to /video/?key=2394943asdfsd0323
RewriteRule ^video/(.+)$ video/?key=$1 [L]
Upvotes: 1