Suoritettu

Deal with dynamic php variables

Hello,

I have a page where it will get a POST submission with c names

1) The POST values can be infinite

2) I need the make sure what comes in the array should be in order

e.g.

$_POST['c1'];

$_POST['c2'];

$_POST['c3'];

$_POST['c4'];

$_POST['c5'];

$_POST['c6'];

.

.

.

$_POST['cn'];

Teh code is

$cd_arr = [];

if(isset($_POST)){

foreach($_POST as $k => $v){

if($k[0] == 'c' && is_numeric($k[1]) == TRUE){

$cd_arr[] = mysqli_real_escape_string($connect,$v);

}}}

The code is working but the order of the array is going to be wrong if c2 posted before c1 and so on

I want the array $cd_arr to contain the values in order as per c number even if the post is not in order.

Taidot: HTML, PHP, tietojärjestelmäarkkitehtuuri

Näytä lisää: define dynamic variable in php, php dynamic variable names in for loop, dynamic variable name php, how to get dynamic value in php, php dynamic array variable name, php 7 variables, php variable variables array, php string to variable, convert static web page dynamic php sql, modifying php variables, dynamic php scripts, dynamic php menu creator, build dynamic php website, menu dynamic php, form dynamic php state city, dynamic php quotation system, paypal sign button dynamic php, change title dynamic php, joomla dynamic php, php variables actionscript

Tietoa työnantajasta:
( 31 arvostelua ) muscat, Oman

Projektin tunnus: #19601326

Myönnetty käyttäjälle:

haiyang19890101

Hello! I have seen your project description. I will complete your project satisfactorily to your requirement. I can start work right away. I will be looking forward to hear from you. Thanks.

$10 USD 1 päivässä
(12 Arvostelua)
3.0

38 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

polarjin2017

Hello? I have gone through the job details carefully and I am excited to start working on this project. I am ready to start work immediately. So I think I can help you if you want. Here are my working result for php, m Lisää

$50 USD 7 päivässä
(116 arvostelua)
6.9
mak94pk

Hello Sir/Mam, MAKSOF is a team of highly qualified professionals who is dedicated in providing creative solutions and innovative ideas for your business with our skills in technologies and strategies. We have r Lisää

$25 USD 1 päivässä
(68 arvostelua)
6.7
Creativeartbd

Yes, I can do this Loop using PHP. So do you need the working code from me or I need to add this code to your website?

$30 USD 1 päivässä
(133 arvostelua)
6.7
moderninfotech

Hello, This is Fateema have 9+ years of software development experience with me in web development including PHP/Mysql/Javascipt/jQuery/JSON/Ajax/ Will do your Count change within 15 mins. Lets have a chat for fu Lisää

$25 USD 1 päivässä
(159 arvostelua)
7.1
glennwilkins

sir message me im php expert ... sir message me im php expert ... sir message me im php expert ... sir message me im php expert ...

$25 USD 0 päivässä
(192 arvostelua)
6.3
justTry

Hello! No problems, I can fix that for you. Ready when you are. Kind Regards, Dobri

$15 USD 0 päivässä
(163 arvostelua)
6.1
brendanmullan90

Hello, my name is Brendan. I have read your project specifications and this job fits within my area of expertise. I would love to come on board and work on this with you. I am available to begin immediately. Relevant Lisää

$25 USD 1 päivässä
(64 arvostelua)
6.0
jamesmartin81

We have experience of Website in PHP, Laravel, CodeIgnitor, Wordpress, Opencart, Woocommerce . We also have experience of making Android,Window and iphone application with ionic & phonegap. Benefits in working with Lisää

$20 USD 1 päivässä
(110 arvostelua)
5.8
dataenterworker

ready to start work on it. I have 100+ reviews with all 5 stars and 12+ years experience. Looking forward from you soon Thank you

$25 USD 1 päivässä
(86 arvostelua)
5.5
jinxing4

Dear Sir. I am interested in your project. I'm senior PHP, SQL, Javascript developer. I assure, I will do my best to work with you on your project to present the best possible outcome for you and your customers. I w Lisää

$30 USD 1 päivässä
(78 arvostelua)
5.5
simpishukla15

Dear Client, Thank you for looking at my candidature. As per your given brief you are looking for a skilled developer, who can resolved "POST" variable related issues, i am glad to say that i have prior experience in Lisää

$20 USD 2 päivässä
(34 arvostelua)
5.4
BlackEagle86

Hi, High talented Mobile and Web expert is here! I have graduated from National University of Singapore and received Master Degree there. As I am a professional Mobile app and Web developer, I can do your job perfectly Lisää

$20 USD 7 päivässä
(6 arvostelua)
4.9
dzireinfotech

Hello, Greetings for the day. I am an experienced php developer and can provide you with quality work as per your requirements. Look forward to discuss further details. Thanks.

$25 USD 1 päivässä
(20 arvostelua)
4.9
blister47

Hi there, I can help you solve the issue with the variable order sorting. This can be done by sorting the post array keys. Lets discuss the issue in more detail. I work on front-end and back-end applications using Lisää

$20 USD 1 päivässä
(19 arvostelua)
4.5
bdmpankaj

The skills and resources needed for this project are in my genes. We can assure you for a complete professional work in a given timeline. Please share the complete detail of your requirement. We have 8+ year experi Lisää

$20 USD 1 päivässä
(41 arvostelua)
5.1
parmindersidhu

Hey! After reading over your application this looks like a perfect fit for my skills sets . My skill set includes:PHP (custom + core),CMS(WordPress,Joomla, Magento),Framework (Laravel,codeigniter, Bootstrap ,HTML5, Lisää

$23 USD 1 päivässä
(7 arvostelua)
4.0
hardikchavda1237

Hello, I have gone through the post and yes; I will help you for sure to design and develop a Website with clean design and clear responsiveness to all devices. As per your requirement, I would like to tell you that Lisää

$15 USD 1 päivässä
(12 arvostelua)
4.2
kdwebsolution9

Hello sir, Hope you are doing well. i have 6+ years of experience in WordPress php codeigniter html css mysql javascript bootstrap graphic design website design etc. these job suitable for me Kind Regards, pu Lisää

$25 USD 1 päivässä
(21 arvostelua)
4.5
rainsys

--------- PLEASE GIVE ME A CHANCE TO WORK ON YOUR PROJECT --------- Dear Sir / Madam, I am Eric from Rainsys. Rainsys is a Web & Software Development Company with 12 persons working together. We have 9+ years of ex Lisää

$10 USD 1 päivässä
(12 arvostelua)
3.9
vaibhavzain

This type of problem can be easily solved with javascript ,i can modify like you can made any number of time and can change as well at user interface ,don't need to set it staticly.

$12 USD 1 päivässä
(14 arvostelua)
3.7