I have an array like so:
array{
[39] => src="http://www.google.com/jsapi">
[111] => src="http://www.example.com/wp-content/themes/code.js"
[55] => src="http://www.example.com/wp-content/themes/yui.js"
[1015] => src="wp-content/uploads/website.jpg"
}
Qeustion
What is the best way to find the difference of string ?
What I mean is to check if there are any duplicates.
src="http://www.example.com/wp-content/themes/ is repeated twice.
so if I then had an array like this:
array{
[39] => src="http://www.google.com/jsapi">
[55] => src="http://www.example.com/wp-content/themes/yui.js"
[1015] => src="wp-content/uploads/website.jpg"
}
http://www. is repeated twice.
so the Idea is to compare the string with another and find something that is duplicated and push it to an array ... thats all that I need :)
I am not saying it could be possible, but it would be nice if it could be :)
strncmp?https:then the result would be://www.is a duplicate :)jsduplicated injsapiandyui.js?