I have this string: 0000000020C90037:TEMP:data I need this string: TEMP:data. With PHP I would do this: How do I effectively explode a string in JavaScript the way it works in PHP? Answer This is a direct conversion from your PHP code:
PHP Framework vs Content Management System
How would you explain the difference between a PHP Framework and a CMS (like Wordpress) to someone who is very technically savvy, mostly on hardware/networking, but does little or no programming? As …
PHP: many concats or one implode?
In my current project I assemble one string out to many small strings (direct output is NOT an option). Would it be more efficient to do many string concatenations? or should I add the parts to an …
min and max in multidimensional-array
hi i am trying to find min and max values of x and y how can i find this min and max functions is not working correctly $dataPoints = array( array(‘x’ => 2343, ‘y’ => 4322), array(‘x’ => …
MySQL: dates before 1970
I’m working on a church site which has many events before 1970, these events starts from 1001 to today, how can I store the dates in MySQL? This works fine only for dates after 1970, how can I store dates before this year? What kind of datatype should I have in MySQL? Now I’ve set my column to date type
Delete element from multidimensional-array based on value
I’m trying to delete elements from a multidimensional-array based on a value. In this case if a sub-array’s key ‘year’ has the value 2011 I want that sub-array out. Just for the record: i’m running PHP 5.2. My array looks like this: Answer Try this: Then you would call it like this:
How to redirect subdomain to main domain maintaining the same URL?
My main domain(www.mysite.com) is pointing to a folder in my server (/home/user_name/htdocs/mysite.com). I have recently created a subdomain(m.mysite.com) through my hosting account. But it is pointing it to a new folder (/home/user_name/htdocs/m.mysite.com) in my server. I am not able to edit the path to which this new subdomain points to. All my files are hosted in my main folder path.
PHP: Change only a portion of a URL string?
I’m working on a small hoppy project where I want to replace a specific page on a URL. Let me explain: I’ve got the URL http://www.example.com/article/paragraph/low/ I want to keep the URL but …
What is the best way to check if a URL exists in PHP?
What is the best way to see a URL exists and the response is not a 404 ?
Parse inline CSS values with Regex?
I have such an inline CSS like this color:#777;font-size:16px;font-weight:bold;left:214px;position:relative;top:70px The CSS may end with a semicolon “;” or not. It also can contain extra space …