embedded variable that doesn't work like i wantIs there a static code analyzer [like Lint] for PHP files?Create a folder if it doesn't already existReference — What does this symbol mean in PHP?Why doesn't this code simply print letters A to Z?“Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHPHow does PHP 'foreach' actually work?How to pass variables and data from PHP to JavaScript?JavaScript's document.write doesn't work like PHP's echoUsing if statement to check if numbers exist in xml file?MySQLi query in variable/function (that can be later used to echo content)
Why do the i8080 I/O instructions take a byte-sized operand to determine the port?
Why did it take so long for Germany to allow electric scooters / e-rollers on the roads?
Unary Enumeration
Reduce size of sum sub/superscript?
Can I render satellite deployment impossible, or at least impractical, by exploiting the Kessler syndrome?
Alexandrov's generalization of Cauchy's rigidity theorem
What is the use case for non-breathable waterproof pants?
How to deceive the MC
What did the 'turbo' button actually do?
Is there an idiom that means that you are in a very strong negotiation position in a negotiation?
Is keeping the forking link on a true fork necessary (Github/GPL)?
Where is Jon going?
Why did other houses not demand this?
Ribbon Cable Cross Talk - Is there a fix after the fact?
Complications of displaced core material?
Why did OJ Simpson's trial take 9 months?
What did Brienne write about Jaime?
Papers on ArXiv as main references
Why is std::ssize() introduced in C++20?
Can a multiclassed Kensei monk/Swashbuckler rogue use an offhand finesse weapon to trigger Sneak Attack, without using a bonus action?
Why does Bran want to find Drogon?
How do you earn the reader's trust?
How can I minimize the damage of an unstable nuclear reactor to the surrounding area?
Is it normal to "extract a paper" from a master thesis?
embedded variable that doesn't work like i want
Is there a static code analyzer [like Lint] for PHP files?Create a folder if it doesn't already existReference — What does this symbol mean in PHP?Why doesn't this code simply print letters A to Z?“Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHPHow does PHP 'foreach' actually work?How to pass variables and data from PHP to JavaScript?JavaScript's document.write doesn't work like PHP's echoUsing if statement to check if numbers exist in xml file?MySQLi query in variable/function (that can be later used to echo content)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
i'm sorry for this, i'm no so able with php.
I have this code:
<?php
$sq1053= "Liverpool";
$query5 = "SELECT ruolo1, nazionalita, cognome, nome, squadra, stipendio, scadenza FROM giocatori WHERE club='$clubscelto'";
$result = $con->query($query5);
$array24 = [];
while($row24 = $result->fetch_row()){
array_push($array24, $row24);
for($nuovariga = 0; $nuovariga < $tesserati; $nuovariga++)
?>
<tr>
<td style="width:10%;border: 1px solid black"><b><?php echo $array24[$nuovariga][0]; ?></b></td>
<td style="width:50%;border: 1px solid black"><b><?php echo $$array24[$nuovariga][1] . $array24[$nuovariga][2] . $array24[$nuovariga][3]; ?></b></td>
<td style="width:10%;border: 1px solid black"><b><?php echo '$sq' . ($array24[$nuovariga][4]); ?></b></td>
<td style="width:20%;border: 1px solid black"><b><?php echo $array24[$nuovariga][5]; ?></b></td>
<td style="width:10%;border: 1px solid black"><b><?php echo $array24[$nuovariga][6]; ?></b></td>
</tr>
<?php ?>
</table></br>
My Array provide to give me many variables like $sq1053 called in the main part of code, but this variable don't work as i want, when i print all on my page i see "$sq1053" and not "Liverpool". How may i obtain a working variable?
Tank you :)
php
add a comment |
i'm sorry for this, i'm no so able with php.
I have this code:
<?php
$sq1053= "Liverpool";
$query5 = "SELECT ruolo1, nazionalita, cognome, nome, squadra, stipendio, scadenza FROM giocatori WHERE club='$clubscelto'";
$result = $con->query($query5);
$array24 = [];
while($row24 = $result->fetch_row()){
array_push($array24, $row24);
for($nuovariga = 0; $nuovariga < $tesserati; $nuovariga++)
?>
<tr>
<td style="width:10%;border: 1px solid black"><b><?php echo $array24[$nuovariga][0]; ?></b></td>
<td style="width:50%;border: 1px solid black"><b><?php echo $$array24[$nuovariga][1] . $array24[$nuovariga][2] . $array24[$nuovariga][3]; ?></b></td>
<td style="width:10%;border: 1px solid black"><b><?php echo '$sq' . ($array24[$nuovariga][4]); ?></b></td>
<td style="width:20%;border: 1px solid black"><b><?php echo $array24[$nuovariga][5]; ?></b></td>
<td style="width:10%;border: 1px solid black"><b><?php echo $array24[$nuovariga][6]; ?></b></td>
</tr>
<?php ?>
</table></br>
My Array provide to give me many variables like $sq1053 called in the main part of code, but this variable don't work as i want, when i print all on my page i see "$sq1053" and not "Liverpool". How may i obtain a working variable?
Tank you :)
php
add a comment |
i'm sorry for this, i'm no so able with php.
I have this code:
<?php
$sq1053= "Liverpool";
$query5 = "SELECT ruolo1, nazionalita, cognome, nome, squadra, stipendio, scadenza FROM giocatori WHERE club='$clubscelto'";
$result = $con->query($query5);
$array24 = [];
while($row24 = $result->fetch_row()){
array_push($array24, $row24);
for($nuovariga = 0; $nuovariga < $tesserati; $nuovariga++)
?>
<tr>
<td style="width:10%;border: 1px solid black"><b><?php echo $array24[$nuovariga][0]; ?></b></td>
<td style="width:50%;border: 1px solid black"><b><?php echo $$array24[$nuovariga][1] . $array24[$nuovariga][2] . $array24[$nuovariga][3]; ?></b></td>
<td style="width:10%;border: 1px solid black"><b><?php echo '$sq' . ($array24[$nuovariga][4]); ?></b></td>
<td style="width:20%;border: 1px solid black"><b><?php echo $array24[$nuovariga][5]; ?></b></td>
<td style="width:10%;border: 1px solid black"><b><?php echo $array24[$nuovariga][6]; ?></b></td>
</tr>
<?php ?>
</table></br>
My Array provide to give me many variables like $sq1053 called in the main part of code, but this variable don't work as i want, when i print all on my page i see "$sq1053" and not "Liverpool". How may i obtain a working variable?
Tank you :)
php
i'm sorry for this, i'm no so able with php.
I have this code:
<?php
$sq1053= "Liverpool";
$query5 = "SELECT ruolo1, nazionalita, cognome, nome, squadra, stipendio, scadenza FROM giocatori WHERE club='$clubscelto'";
$result = $con->query($query5);
$array24 = [];
while($row24 = $result->fetch_row()){
array_push($array24, $row24);
for($nuovariga = 0; $nuovariga < $tesserati; $nuovariga++)
?>
<tr>
<td style="width:10%;border: 1px solid black"><b><?php echo $array24[$nuovariga][0]; ?></b></td>
<td style="width:50%;border: 1px solid black"><b><?php echo $$array24[$nuovariga][1] . $array24[$nuovariga][2] . $array24[$nuovariga][3]; ?></b></td>
<td style="width:10%;border: 1px solid black"><b><?php echo '$sq' . ($array24[$nuovariga][4]); ?></b></td>
<td style="width:20%;border: 1px solid black"><b><?php echo $array24[$nuovariga][5]; ?></b></td>
<td style="width:10%;border: 1px solid black"><b><?php echo $array24[$nuovariga][6]; ?></b></td>
</tr>
<?php ?>
</table></br>
My Array provide to give me many variables like $sq1053 called in the main part of code, but this variable don't work as i want, when i print all on my page i see "$sq1053" and not "Liverpool". How may i obtain a working variable?
Tank you :)
php
php
edited Mar 24 at 8:11
Clifford
62k861129
62k861129
asked Mar 23 at 21:56
Mauro GonzatoMauro Gonzato
173
173
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If I understood what you're trying to do, replace:
<?php echo '$sq' . ($array24[$nuovariga][4]); ?>
with:
<?php echo $'sq' . $array24[$nuovariga][4]; ?>
See Variable variables from the manual.
That being said, I would strongly suggest making use of arrays instead.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55318777%2fembedded-variable-that-doesnt-work-like-i-want%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If I understood what you're trying to do, replace:
<?php echo '$sq' . ($array24[$nuovariga][4]); ?>
with:
<?php echo $'sq' . $array24[$nuovariga][4]; ?>
See Variable variables from the manual.
That being said, I would strongly suggest making use of arrays instead.
add a comment |
If I understood what you're trying to do, replace:
<?php echo '$sq' . ($array24[$nuovariga][4]); ?>
with:
<?php echo $'sq' . $array24[$nuovariga][4]; ?>
See Variable variables from the manual.
That being said, I would strongly suggest making use of arrays instead.
add a comment |
If I understood what you're trying to do, replace:
<?php echo '$sq' . ($array24[$nuovariga][4]); ?>
with:
<?php echo $'sq' . $array24[$nuovariga][4]; ?>
See Variable variables from the manual.
That being said, I would strongly suggest making use of arrays instead.
If I understood what you're trying to do, replace:
<?php echo '$sq' . ($array24[$nuovariga][4]); ?>
with:
<?php echo $'sq' . $array24[$nuovariga][4]; ?>
See Variable variables from the manual.
That being said, I would strongly suggest making use of arrays instead.
edited Mar 24 at 0:17
answered Mar 23 at 23:31
JetoJeto
7,47921224
7,47921224
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55318777%2fembedded-variable-that-doesnt-work-like-i-want%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown