Hey fellas,
So I'm trying to create a class for calling user's motto but I need to use like
as you can see, I have to use [0] before the [12] (motto column). I want it to be dynamic, and I don't know how to search this in google, what would be your opinions/suggestions?
So I'm trying to create a class for calling user's motto but I need to use like
PHP:
$stmt = $db->prepare("SELECT * FROM users WHERE username = :u");
$stmt->bindParam(':u', $_SESSION['user']['username']);
$stmt->execute();
$fetch = $stmt->fetchAll();
// print_r($fetch);
$this->motto = $fetch[0][12];