| Summary | allow associative arrays in text_diff |
| Queue | Horde Framework Packages |
| Queue Version | HEAD |
| Type | Enhancement |
| State | Rejected |
| Priority | 1. Low |
| Owners | |
| Requester | vilius (at) lnk (dot) lt |
| Created | 03/31/2006 (7156 days ago) |
| Due | |
| Updated | 11/16/2006 (6926 days ago) |
| Assigned | |
| Resolved | 11/16/2006 (6926 days ago) |
| Milestone | |
| Patch | No |
State ⇒ Rejected
Nice array diffs might be something else, but I'd want a strong use
case for it.
Horde_Array package would be possible. Just like we have Horde_String
on top of the different PHP string functions.
the diff for this feature?
will be returned in different order (for example array("id" => "1",
"name" => "Pavel", "surname" => "Lescynskyj")) and I would want to
differ it with array from xml file (array("id" => "1", "surname" =>
"Lescynskyj", "name" => "Pavel")) it should be the same.
If you against including it into Text_Diff, then maybe new Horde_Array
package would be possible. Just like we have Horde_String on top of
the different PHP string functions.
a Text_* package. If you want it to just be handled like lines of
text, though, then you can implode() them with \n.
$array1 = array("one" => "1", "two" => "2");
$array2 = array("one" => "2", "two" => "3");
should produce:
<del>1</del>
<ins>2</ins>
<del>2</del>
<ins>3</ins>
and
$array1 = array("one" => "1", "two" => "2");
$array2 = array("two" => "1", "one" => "2");
<del>1</del>
<ins>2</ins>
<del>2</del>
<ins>1</ins>
I have one data array from XML file, and the other from database.
Application imports XML file to database if there are new or changed
entries. Basically I want to have nice GUI (like in Chora :)) with
checkbox options what I want to import and what don't. So it would be
handy to make such comparison with Text_Diff in the way I posted a
comment earler.
1
2
?
State ⇒ Feedback
$array2 = array("two" => "1", "one" => "2");
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ allow associative arrays in text_diff
Queue ⇒ Horde Framework Packages
State ⇒ New
$array1 = array("one" => "1", "two" => "2");
$array2 = array("one" => "2", "two" => "3");
which should produse
<del>1</del>
2
<ins>3</ins>