Seval Patel
Seval Patel

Reputation: 1

How to use array as $_REQUEST in php

As we use $sub = $_REQUEST["sub"] for passing string onto the php But How can I perform same thing in array I want to pass String array as parameter onto the php file using $_REQUEST. Help me.

Upvotes: 0

Views: 74

Answers (1)

hoyeonUm
hoyeonUm

Reputation: 49

Your question was unclear.

If you want $sub to array you can do:

$sub[] = $_REQUEST["sub"]

And if you want $_REQUEST["sub"] to array you can do:

$sub = $_REQUEST["sub[]"]

Upvotes: 2

Related Questions