Here is the code:
$word[$i]=str_replace("*", ", ", $word[$i]); $part=explode("=", $word[$i]); $part1=str_replace("|", " ", $part[0]); $part2=str_replace("|", " ", $part[1]);
When executed, if $word
contains type expressions:
[674237234092340234-42348437436::?(*)(_):;№! " " %)(_)]{^%#$@##$^^&*(&~@GVY()(*)(IOU}
Then an error occurs
PHP Notice: Undefined offset: 1 in ...
which points to the string:
$part2=str_replace("|", " ", $part[1]);
Actually, how to fix the error?
UPD :
If $word
contains: "There is no character in the given line ( $word
)", then no error occurs, although there is no =
sign.