Stats: 3,191,132 members, 7,943,081 topics. Date: Sunday, 08 September 2024 at 03:40 AM |
Nairaland Forum / Science/Technology / Programming / Getting This Error In PHP Scripts Please Any Help? (470 Views)
Encountering This Error In Django: TypeError: 'module' Object Is Not Iterable / I Keep Getting This Error Message "Gradle Project Syn Failed... / Needs A %50 Percent Ponzi Script..workling Scripts Please (2) (3) (4)
Getting This Error In PHP Scripts Please Any Help? by Premiumwriter: 2:39am On Apr 01, 2021 |
The line of the code giving me problem is this: $pad = ord($text{strlen($text) - 1}); The error I got is Fatal error: Array and string offset access syntax with curly braces is no longer supported in (then the directory of the file with the line code). Please any help on how I can fix this? Thanks |
Re: Getting This Error In PHP Scripts Please Any Help? by stanliwise(m): 7:59am On Apr 01, 2021 |
Premiumwriter:Please explain what $text means. If $text is an array then do $text[] rather than $text{} |
Re: Getting This Error In PHP Scripts Please Any Help? by Premiumwriter: 9:35am On Apr 02, 2021 |
stanliwise: I changed the {} to [] but the code stopped loading. i have attached a screenshot for you to see. the first screenshot is the original one while the second screenshot is the one i made the changes as you suggested and it stopped responding. line 167 fnep2smooth
|
Re: Getting This Error In PHP Scripts Please Any Help? by stanliwise(m): 10:32pm On Apr 02, 2021 |
Premiumwriter:The problem here now is that your screenshot does not tell what type of data we are expecting $text to be, should it be array? string? integer? object? meanwhile ord by nature receives a character as an argument. so my conclusion would be this ord($text[strlen($text) - 1)]); The above should be the correct pattern |
(1) (Reply)
Your Iphone Could Be Hacked!!!! / 2d Games With Unity / How do I Ping Emails In CSV With Smtplib
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9 |