Jump to content

how to modify a static name to variable in one-line code?


artist19

Recommended Posts

<?php echo $row_Signs['Define']; ?>

 

Based on the name (Define) of the table (mySQL) above, how do I modify this rating line below?

 

<?php $rr->showStars("sudoku"); ?>

 

For example:

 

<?php $rr->showStars($row_Signs['Define']); ?>

 

but I'm not sure how to code this correctly. Yes, I am a php newbie.:)

 

Thanks much in advance.

 

 

 

Link to comment
Share on other sites

The part 'Define' variable does not show up. It shows blank. I tried different ways (by blind guesses) but no luck.

 

Like these:

 

<?php echo $rr->showStars($row_Signs['Define']); ?>

 

or

 

<?php

$Rating -> echo $row_Signs['Define'];

            $rr->showStars("$Rating");

        }

    ?>

 

No luck but the only thing that works is to put any word in it (static) like:

 

<?php echo $rr->showStars("any-word-you-place-here"); ?>

 

It works but, not working with $variable in it.

 

The code I use <?php echo $row_Signs['Define']; ?> in the other parts do work. I can't figure out these hints. Any ideas with possible codes?

 

Your help would be greatly appreciated. Thanks.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.