Search found 7 matches

by PHPPadawan
Wed Dec 12, 2018 3:39 pm
Forum: PHP General
Topic: How can I avoid this Undefined index notice?
Replies: 4
Views: 1161

Re: How can I avoid this Undefined index notice?

sorry! I was being daft!

Code: Select all

		if (isset ($cards[$card_name])){
			$cards[$card_name] += $count;
		}else{
		$cards[$card_name] = $count;
		}
by PHPPadawan
Wed Dec 12, 2018 3:33 pm
Forum: PHP General
Topic: How can I avoid this Undefined index notice?
Replies: 4
Views: 1161

Re: How can I avoid this Undefined index notice?

hey, thanks for the response.

which variable? I think your example suggests $card_name, is that right?
by PHPPadawan
Wed Dec 12, 2018 2:10 pm
Forum: PHP General
Topic: How can I avoid this Undefined index notice?
Replies: 4
Views: 1161

How can I avoid this Undefined index notice?

Hi everyone, the line "$cards[$card_name] += $count;" keeps giving me a undefined index notice, how can i fix it? thanks in advance for any help. $deck = "Octane Optimized, Alpha Serrated, Sculpted Aegis #2, Nautical Carrier, Saiph Starmaw, Nautical Carrier, Hurkol Bloodvessel, Myrmidon Remnant #2, ...
by PHPPadawan
Sat Jun 16, 2018 1:12 pm
Forum: PHP coding => General
Topic: create multiple instances of a script
Replies: 2
Views: 704

Re: create multiple instances of a script

thanks for the reply. Unfortunately, pthreads looks too complex for me to use at the moment - it's something I'll definitely consider once I've got a better grasp of php. I’ve created a script that’ll split the users into groups - is there any way I can create a new CLI instance and pass it a mysqli...
by PHPPadawan
Fri Jun 15, 2018 5:15 am
Forum: PHP coding => General
Topic: create multiple instances of a script
Replies: 2
Views: 704

create multiple instances of a script

Hey guys, I have 40 users that I’d like to run a script for – the script takes about 10 minutes to process each user so it takes over 6.5 hours to run. I really wanted it to take an hour or less so I copied the script 7 times and divided the users across the 7 scripts – that worked but is there a wa...
by PHPPadawan
Mon May 21, 2018 11:16 am
Forum: PHP coding => General
Topic: extracting data from xml into custom array
Replies: 2
Views: 706

Re: extracting data from xml into custom array

Thanks! XPATH looks perfect for the job.
by PHPPadawan
Sun May 20, 2018 11:39 am
Forum: PHP coding => General
Topic: extracting data from xml into custom array
Replies: 2
Views: 706

extracting data from xml into custom array

I'm new to PHP and I'd love to get some advice off you guys. Is my use of ternary logic acceptable or is there a better way to achieve the same goal? I'm also struggling to extract <card_id>49970</card_id> with my current code... could anyone suggest a solution? Current code: <?php ini_set('max_exec...