Zend
200-710 · Question #194
What will the following code piece print? echo strtr('Apples and bananas', 'ae', 'ea');
The correct answer is A. Applas end benenes. See the full explanation below for the reasoning.
Strings & Patterns
Question
What will the following code piece print?
echo strtr('Apples and bananas', 'ae', 'ea');
Options
- AApplas end benenes
- BEpplas end bananes
- CApples and bananas
- DApplas end bananas
How the community answered
(37 responses)- A73% (27)
- B16% (6)
- C8% (3)
- D3% (1)
Topics
#strtr#character translation#string manipulation
Community Discussion
No community discussion yet for this question.