Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8436721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:15:34+00:00 2026-06-10T07:15:34+00:00

I’ve been practising php & mysql and at the moment I’m creating a simple

  • 0

I’ve been practising php & mysql and at the moment I’m creating a simple database manager. Everything works fine except for this piece of code: http://snipt.org/vCW0

What this code is supposed to do is to get all the results from the database and display them, except while showing the position and the team name it should change position and team name values (which I insert into the database using abbreviations, e.g. ‘qb’ instead of ‘Quarterback’ to save the space) into their full equivalents (so ‘gba’ should display as ‘Green Bay Packers’, etc.) (and at the end a form for adding new entries). It actually displays them correctly but when I add a new player to the database, I get the following error:

Warning: Illegal string offset 'qb' in C:\web\project2\ranking_nfl.php on line 97

Warning: Illegal string offset 'rb' in C:\web\project2\ranking_nfl.php on line 98

Warning: Illegal string offset 'fb' in C:\web\project2\ranking_nfl.php on line 99

Warning: Illegal string offset 'te' in C:\web\project2\ranking_nfl.php on line 100

Warning: Illegal string offset 'wr' in C:\web\project2\ranking_nfl.php on line 101

Warning: Illegal string offset 'ol' in C:\web\project2\ranking_nfl.php on line 102

Warning: Illegal string offset 'dt' in C:\web\project2\ranking_nfl.php on line 103

Warning: Illegal string offset 'de' in C:\web\project2\ranking_nfl.php on line 104

Warning: Illegal string offset 'mlb' in C:\web\project2\ranking_nfl.php on line 105

Warning: Illegal string offset 'olb' in C:\web\project2\ranking_nfl.php on line 106

Warning: Illegal string offset 'cb' in C:\web\project2\ranking_nfl.php on line 107

Warning: Illegal string offset 's' in C:\web\project2\ranking_nfl.php on line 108

Warning: Illegal string offset 'ret' in C:\web\project2\ranking_nfl.php on line 109

Warning: Illegal string offset 'k' in C:\web\project2\ranking_nfl.php on line 110

Warning: Illegal string offset 'p' in C:\web\project2\ranking_nfl.php on line 111

Warning: Illegal string offset 'ari' in C:\web\project2\ranking_nfl.php on line 116

Warning: Illegal string offset 'atl' in C:\web\project2\ranking_nfl.php on line 117

Warning: Illegal string offset 'bal' in C:\web\project2\ranking_nfl.php on line 118

Warning: Illegal string offset 'buf' in C:\web\project2\ranking_nfl.php on line 119

Warning: Illegal string offset 'car' in C:\web\project2\ranking_nfl.php on line 120

Warning: Illegal string offset 'chi' in C:\web\project2\ranking_nfl.php on line 121

Warning: Illegal string offset 'cin' in C:\web\project2\ranking_nfl.php on line 122

Warning: Illegal string offset 'cle' in C:\web\project2\ranking_nfl.php on line 123

Warning: Illegal string offset 'dal' in C:\web\project2\ranking_nfl.php on line 124

Warning: Illegal string offset 'den' in C:\web\project2\ranking_nfl.php on line 125

Warning: Illegal string offset 'det' in C:\web\project2\ranking_nfl.php on line 126

Warning: Illegal string offset 'gba' in C:\web\project2\ranking_nfl.php on line 127

Warning: Illegal string offset 'hou' in C:\web\project2\ranking_nfl.php on line 128

Warning: Illegal string offset 'ind' in C:\web\project2\ranking_nfl.php on line 129

Warning: Illegal string offset 'jax' in C:\web\project2\ranking_nfl.php on line 130

Warning: Illegal string offset 'kan' in C:\web\project2\ranking_nfl.php on line 131

Warning: Illegal string offset 'mia' in C:\web\project2\ranking_nfl.php on line 132

Warning: Illegal string offset 'min' in C:\web\project2\ranking_nfl.php on line 133

Warning: Illegal string offset 'nen' in C:\web\project2\ranking_nfl.php on line 134

Warning: Illegal string offset 'nor' in C:\web\project2\ranking_nfl.php on line 135

Warning: Illegal string offset 'nyg' in C:\web\project2\ranking_nfl.php on line 136

Warning: Illegal string offset 'nyj' in C:\web\project2\ranking_nfl.php on line 137

Warning: Illegal string offset 'oak' in C:\web\project2\ranking_nfl.php on line 138

Warning: Illegal string offset 'phi' in C:\web\project2\ranking_nfl.php on line 139

Warning: Illegal string offset 'pit' in C:\web\project2\ranking_nfl.php on line 140

Warning: Illegal string offset 'sdg' in C:\web\project2\ranking_nfl.php on line 141

Warning: Illegal string offset 'sfr' in C:\web\project2\ranking_nfl.php on line 142

Warning: Illegal string offset 'sea' in C:\web\project2\ranking_nfl.php on line 143

Warning: Illegal string offset 'stl' in C:\web\project2\ranking_nfl.php on line 144

Warning: Illegal string offset 'tam' in C:\web\project2\ranking_nfl.php on line 145

Warning: Illegal string offset 'ten' in C:\web\project2\ranking_nfl.php on line 146

Warning: Illegal string offset 'was' in C:\web\project2\ranking_nfl.php on line 147

Warning: Illegal string offset 'gba' in C:\web\project2\ranking_nfl.php on line 153

Warning: Illegal string offset 'qb' in C:\web\project2\ranking_nfl.php on line 154 

However, despite the error the record is added to the database and shown on the page. Deleting records doesn’t show any errors.

Here is the full code: http://snipt.org/vCV8

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:15:36+00:00Added an answer on June 10, 2026 at 7:15 am

    Referring to your code at http://snipt.org/vCV8

    try adding this statement before line # 97

    $position = array();
    

    and add this statement before line # 116

    $team = array();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,
I am doing a simple coin flipping experiment for class that involves flipping a
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.