LiDoNg_9_0's Profile
Reputation: 9
Worker
- Group:
- Active Members
- Active Posts:
- 160 (0.12 per day)
- Joined:
- 03-September 09
- Profile Views:
- 3,507
- Last Active:
Aug 21 2012 09:05 AM- Currently:
- Offline
Previous Fields
- Country:
- PL
- OS Preference:
- Windows
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- PC
- Your Car:
- Nissan
- Dream Kudos:
- 0
Latest Visitors
-
codeprada 
01 Dec 2011 - 18:44 -
darek9576 
10 Nov 2011 - 04:15 -
creativecoding 
28 Sep 2011 - 23:06 -
brep 
26 Sep 2011 - 18:22 -
Dormilich 
21 Sep 2011 - 02:43 -
Gorian 
01 Sep 2011 - 07:23 -
mi14chal 
19 Mar 2011 - 12:55 -
BuhRock 
19 Dec 2010 - 03:35 -
singularity 
27 Apr 2010 - 06:21 -
sri Harsha 
25 Apr 2010 - 19:01
Posts I've Made
-
In Topic: Sentence difference algorithm
Posted 17 Aug 2012
CTphpnwb, on 17 August 2012 - 07:44 AM, said:You need to iterate through the arrays manually. Something like this:
$s1="grey tiles 100 X 200 kitchen flooring"; $s2="grey tiles 200 X 600 kitchen flooring"; $sa1=explode(" ",$s1); $sa2=explode(" ",$s2); if(count($sa1) < count($sa2)) { $difference = compare_arrays($sa2,$sa1); } else { $difference = compare_arrays($sa1,$sa2); } echo "The Difference =<br>".$difference; function compare_arrays(&$larger, &$smaller) { $n = count($smaller); $diff = ""; for($i = 0; $i < $n; $i++) { if($larger[$i] != $smaller[$i]) { $diff .= $larger[$i]." vs ".$smaller[$i]."<br>"; } } $n = count($larger); while($i < $n) { if($larger[$i] != $smaller[$i]) { $diff .= $larger[$i]." vs ".$smaller[$i]."<br>"; } $i++; } return $diff; }
wtf, i've been working to this for the whole day and when I post here it was just like 30 mins or something, somebody just got it right. Your amazing dude. Thanks I appreciate your help.
-
In Topic: string slicing / string manipulation
Posted 17 Jul 2012
Astalor, on 17 July 2012 - 09:07 AM, said:Hello there!
For the task you have mentioned I would suggest looking into using regular expressions, below are some useful links to look at.
PREG functions in PHP (in particular hit up preg_match)
http://www.php.net/m...en/ref.pcre.php
A cheat sheet for regular expressions
http://www.cheatogra...ar-expressions/
Thank you astalor.
I already solved this issue using regular expression. I appreciated your help. -
In Topic: time since posted feature like twitter and facebook
Posted 23 Jan 2012
-
In Topic: Getting the date Based on the Dates range and a dayname
Posted 18 Nov 2011
By the way, thank you for your function. It really helps.
-
In Topic: Getting the date Based on the Dates range and a dayname
Posted 18 Nov 2011
Ahh I see. I thought I it could be possibly get it with just a query. Okay, that's all I want to know. Thanks for your reply.
My Information
- Member Title:
- D.I.C Head
- Age:
- 22 years old
- Birthday:
- September 9, 1990
- Gender:
-
- Location:
- Philippines
- Interests:
- Programming
- Full Name:
- Sunny Jay Sabuero
- Years Programming:
- 3
- Programming Languages:
- PHP, VB 6, C/C++
Contact Information
- E-mail:
- Private
- Yahoo:
-
LiDoNg_9_0@yahoo.com
Friends
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
LiDoNg_9_0
13 May 2010 - 18:17