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.

 

 

 

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.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.