Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$str = file_get_contents('test1.txt');
$array[] = str_split($str, 1);
foreach ($array as $number) {
file_put_contents('test1.txt', pow($number, 2));
}
echo file_get_contents('test1.txt');