Skip to content
Advertisement

Javascript Equivalent to PHP Explode()

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: 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

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.

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 …

Advertisement