4 votes

Pset7 Can't Print How Much Cash a User has?

To solve this issue, you need 2 variables. Let's call them $userinfo and $cash. First use query() to get cash value from the row with the id that is contained in $_SESSION. Then use this line of code ...
i_am_david's user avatar
  • 1,211
2 votes
Accepted

Pset7 Table HTML and CSS formatting

The render() function takes two arguments, the first is a string that indicates the name of the template, and the second is an array of key-value pairs. In this case "positions" is a string that ...
wallek876's user avatar
  • 1,399
1 vote
Accepted

PSET7: Extracting strings from queries with PHP

You have answered yourself: Is it because the rows themselves are associative arrays, and so I can never actually extract a single value? If that's the case, how would I just pass one variable ...
Yuri Laguardia's user avatar
1 vote

illegal string offset error in portfolio

Each time you do this $positions[] = ["price" =>number_format($positions["price"],2,'.',',')]; there is a row added to the $positions array that does not have "name", "shares" or "symbol". Ditto ...
DinoCoderSaurus's user avatar
1 vote

My cash won't display in my porfolio

Ok, so I will answer my own question. What query does is make an array of arrays of sorts. So when you do: <?php print_r($cash) ?> You will get a output of all the 'things' in your array. The ...
Fijj's user avatar
  • 29

Only top scored, non community-wiki answers of a minimum length are eligible