PHP Programming quiz, level Intermediate, question 11
| Question: | If you want to change every occurrence of "Mary" to "Maria" in a variable, you would: |
| Answer 1: | Explode the string at "Mary", then Implode it with "Maria". This was the CORRECT answer |
| Answer 2: | Split the string at "Mary", the join it with "Maria". |
| Answer 3: | $string =~ s/Mary/Maria/; |
| Answer 4: | $string =~ s/\bMary\b/Maria/ig; |
This was a question from our quiz ... but we have now provided you with
the answer (above) - we prefer to provide you with information rather than to
puzzle you.
|
|