I posted this a few days ago and did not get much help;
this issue i am having is that after running the foreach loop i have a string that i split into an array in order to run a routine on. after running the foreach loop i would like to move the results in a variable outside the foreach loop for use with my code but only one chr is able to be displayed here is a copy of my code if anyone can help i would be very grateful.
session_start();
$errorMessage = '';
if (isset($POST['txtUserId']) && isset($POST['txtPassword'])) {
include 'include/config.php';
include 'include/opendb.php';
$userId = $_POST['txtUserId'];
$password = $_POST['txtPassword'];
$str = "$password";
$arr1 = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);
$arr = $arr1;
foreach ($arr as $value) {
$test=ord($value);
$test2=$test+10;
if($test2 > 122){
$test2=$test2+33;
$test2=$test2-122;
}
global $test4;
global $test4;
$test3=chr($test2);
$test4 = $test3;
}
echo $test4;