Saved Bookmarks
| 1. |
Solve : How do I get the number of "if"s in a string? (php)? |
|
Answer» CODE: [Select]<?php $CHECK = $_POST['code']; $numifs = 0; // RIGHT here.. // How do I check how many "if"s are in $check? $numifs = // NUMBER found ^^ ?> Use the preg_match function: http://www.php.net/manual/en/function.preg-match.php Have a look at the examples. |
|