/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Embedding count variable in GET statement

I know this could seem odd, but I need to embed a count variable inside of a GET statement. Below is a sample piece of the code.

$count=$_GET[‘count’];
$iterate=1;
while($iterate<=$count){
$sample=$_
GET[‘sample $iterate’];

I have also tried $sample=”$_GET[‘sample”.$iterate.” ‘]”;

I’m running out of options. Is this even possible?

The solution was:
$rsvp=$_GET[‘rsvp’.$iterate];

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@shane_carrAug 01.2006 — If you want to find out how long the get array is, count($_GET);

If you want to access that variable, $sample = $_
GET["sample".$iterate];
Copy linkTweet thisAlerts:
@shane_carrAug 01.2006 — Oh, it's resolved. Nevermind! ?

Also, the correct way to mark it resolved is under thread tools.
×

Success!

Help @rain62537 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...