111 - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of 111.php

  1. <?php
  2.  
  3.  
  4. $arr = array ('мама', 'мамапапа', 'папа');
  5.  
  6. $n = 0;
  7.  
  8. $str = '';
  9.  
  10. for ($i = 0; $i < count($arr); $i++) {
  11.  
  12.     if (strpos($arr[$i], 'мама') !== false) {
  13.  
  14.               $n++;
  15.  
  16.         $str = $str.iconv_strlen($arr[$i], 'UTF-8');
  17.  
  18.     }}
  19.  
  20. echo $n, $str;
  21. ?>
File Description
  • 111
  • PHP Code
  • 06 Mar-2024
  • 280 Bytes
You can Share it: