256 Kilobytes

Content

Welcome to the Internet.

Profile Photo - Some Guy

[PHP] Swap two variables without using third?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:32:46 -0800

Profile Photo - Default

Last Reply Hello, There is no function that will do this but it's pretty easily done using lists and arrays list($a,$b) = array($b,$a); Learn mo... Hash Brown,

Hello,

Mon, 14 Jan 2019 16:56:14 -0800 1 day ago
🗨
1
🐏
0
👁
9
Profile Photo - Some Guy

[PHP] Get longest word in string?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:31:56 -0800

Profile Photo - Default

Last Reply This is fairly simple homie. A basic solution of this would be to explode the string on spaces to turn the string into an array of words. We can... Hash Brown,

This is fairly simple hom...

Mon, 14 Jan 2019 16:47:58 -0800 1 day ago
🗨
1
🐏
0
👁
8
Profile Photo - Some Guy

[PHP] Convert a decimal to a percent?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:31:26 -0800

Profile Photo - Default

Last Reply This is more a maths thing than anything else. If you have the decimal (0 to 1) and want to turn it into a percentage you simply multiply by 100.... Hash Brown,

This is more a maths thin...

Mon, 14 Jan 2019 16:39:07 -0800 1 day ago
🗨
1
🐏
0
👁
5
Profile Photo - Some Guy

Function comparable to PHP implode() in Google Sheets?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:30:16 -0800

Profile Photo - Default

Last Reply #fuckTurks Hash Brown,

#fuckTurks

Mon, 14 Jan 2019 16:23:51 -0800 1 day ago
🗨
3
🐏
0
👁
14
Profile Photo - Some Guy
Profile Photo - Default

Last Reply And just to follow on PHP is pretty retarded. Making your code work with the least number of changes you have to make to php.ini the better. Hash Brown,

And just to follow on<br...

Mon, 14 Jan 2019 16:23:17 -0800 1 day ago
🗨
2
🐏
0
👁
8
Profile Photo - Some Guy

How to fix "Currently unable to handle this request HTTP error 500"?

Answers in Server-Side | By Some Guy

Published 4 weeks agoSun, 16 Dec 2018 09:39:12 -0800

Profile Photo - Default

Last Reply HTTP 500 errors are nortorious for being a bitch to fix. The code signals a server error where it couldn't be more specific in what went wron... Hash Brown,

HTTP 500 errors are norto...

Mon, 14 Jan 2019 16:10:07 -0800 1 day ago
🗨
1
🐏
0
👁
12
Profile Photo - Some Guy

[Dreamhost] Increase PHP memory limit?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:30:36 -0800

Profile Photo - Default

Last Reply For some retarded reason Dreamhost seem to have renamed the php.ini file to the phprc file, but the process is exactly the same as any other hosting p... Hash Brown,

For some retarded reason...

Mon, 14 Jan 2019 16:02:13 -0800 1 day ago
🗨
1
🐏
0
👁
6
Profile Photo - Some Guy

How to choose a random array element in PHP?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:31:16 -0800

Profile Photo - Default

Last Reply You can use the array_rand() function $cars =array("BMW", "Opel", "Mazda", "Triumph", "Vauxhall", "Ford"); $random_keys = array_rand($cars, 3);... Hash Brown,

You can use the array_ran...

Mon, 14 Jan 2019 15:56:18 -0800 1 day ago
🗨
1
🐏
0
👁
6
Profile Photo - Some Guy

Does PHP need a closing tag?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:33:16 -0800

Profile Photo - Default

Last Reply Code should still run, it's a scripting language after all. But this doesn't mean you shouldn't use closing tags. This becomes most imp... Hash Brown,

Code should still run, it...

Mon, 14 Jan 2019 15:51:29 -0800 1 day ago
🗨
1
🐏
0
👁
7
Profile Photo - Some Guy
Profile Photo - Default

Last Reply It's a file that belongs to SimpleSamlPHP Hash Brown,

It's a file that belo...

Mon, 14 Jan 2019 15:39:41 -0800 1 day ago
🗨
1
🐏
0
👁
6
Profile Photo - Some Guy

[PHP] How to get a random float between 0 and 1?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:34:46 -0800

Profile Photo - Default

Last Reply Theres no standard PHP function for random floats specifically, but you can get a random whole number and then divide it to create a float. $rand... Hash Brown,

Theres no standard PHP fu...

Mon, 14 Jan 2019 15:02:05 -0800 1 day ago
🗨
1
🐏
0
👁
5
Profile Photo - Some Guy

[PHP] Issue with file_put_contents not working?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:33:36 -0800

Profile Photo - Default

Last Reply Lots of the "file_" functions are disabled as standard in PHP so the first step is checking your php.ini file and enabling it. The next m... Hash Brown,

Lots of the "file_&q...

Mon, 14 Jan 2019 14:57:22 -0800 1 day ago
🗨
1
🐏
0
👁
7
Profile Photo - Some Guy

[PHP] Check if positive integer?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:35:26 -0800

Profile Photo - Default

Last Reply Yes this is very easy Just check that the integer is bigger than 0 For example: $i = 15; if(is_numeric($i) && $i >= 0){ echo... Hash Brown,

Yes this is very easy<br...

Mon, 14 Jan 2019 14:43:42 -0800 1 day ago
🗨
1
🐏
0
👁
7
Profile Photo - Some Guy

How to check if a string is valid XML using PHP?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:34:26 -0800

Profile Photo - Default

Last Reply You can use PHP's DomDocument::validate feature dear for all your XML validation needs $dom = new DOMDocument; $dom->Load('book.xml'); //... Hash Brown,

You can use PHP's Dom...

Mon, 14 Jan 2019 14:28:34 -0800 1 day ago
🗨
1
🐏
0
👁
6
Profile Photo - Some Guy

[PHP] How to remove duplicate dashes?

Answers in Server-Side | By Some Guy

Published 3 days agoSun, 13 Jan 2019 04:34:36 -0800

Profile Photo - Default

Last Reply preg_replace() will do this pretty easily. I'm not sure if you want to completely remove double dashes or replace them with a single dash, the... Hash Brown,

preg_replace() will do th...

Mon, 14 Jan 2019 14:23:10 -0800 1 day ago
🗨
1
🐏
0
👁
5