Answers for "array and string offset access syntax with curly braces is deprecated in mpdf"

PHP
1

Array and string offset access syntax with curly braces is deprecated in tcpdf.php

//Let's say you have something like this in your code:
$str = "test";
echo($str{0});

//since PHP 7.4 curly braces method to get individual characters inside a string has been deprecated, so change the above syntax into this:
$str = "test";
echo($str[0]);
Posted by: Guest on May-04-2021
3

Array and string offset access syntax with curly braces is deprecated

Let's say you have something like this in your code:

$str = "test";
echo($str{0});

since PHP 7.4 curly braces method to get individual characters inside a string has been deprecated, so change the above syntax into this:

$str = "test";
echo($str[0]);
Posted by: Guest on September-11-2020

Code answers related to "array and string offset access syntax with curly braces is deprecated in mpdf"

Browse Popular Code Answers by Language