Hi everyone! I'm the author of code.mu :)
I'd love to chat with my non-Russian audience. I'm looking for your feedback on the site and the translation quality. Let's chat:)
56 of 110 menu

The First Character of a String in PHP

Ready example of getting the first character of a string:

<?php $str = 'text'; echo $str[0]; ?>

Code execution result:

't'
English
БеларускаяEspañolРусский
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline