I have a String like that : Sun Jul 21 02:51:39 +0000 2013 
i want to convert it to a date with PHP, it's possible ??
            Asked
            
        
        
            Active
            
        
            Viewed 58 times
        
    0
            
            
         
    
    
        userHassan
        
- 23
- 1
- 6
- 
                    you can simply use the date function of php. – Drudge Rajen Nov 16 '13 at 11:09
2 Answers
0
            
            
        do it like that:
$arr = date_parse("Sun Jul 21 02:51:39 +0000 2013");
after that you can do something like this:
$unixTimestamp = mktime($arr["hour"], $arr["minute"], $arr["second"], $arr["month"], $arr["day"], $arr["year"]); 
 
    
    
        Tobias Bambullis
        
- 736
- 5
- 17
- 45
0
            
            
        Or you can use strtotime also. http://php.net/strtotime It works for older php versions also.
 
    
    
        Lajos Veres
        
- 13,595
- 7
- 43
- 56