Help with defining a new variable

I’d like to define a variable that is the wallet amount of the ‘seller’.

‘wallet’ is column in the ‘users’ table with a numeric amount in it.
Users have unique id numbers in the ‘id’ column of the ‘users’ table.

Can you tell me if this is a valid variable line:

$sellerwallet = $user_id->wallet;

If this helps you, in the php file that I’d like to modify, I see these lines:

$user_id = $user->id;

and

‘user_id’ => $video->user_id, //seller

If my $sellerwallet line is incorrect, can you give me an idea or example of what my defined variable line might appropriately look like? Thanks
I look forward to your comments/guidance

Try this:

$sellerwallet = $user->wallet;
1 Like
Sponsor our Newsletter | Privacy Policy | Terms of Service