Question: Consider the following very simple foreign key constraint:

```
CREATE TABLE [Person]([id] uniqueidentifier NOT NULL, [name] nvarchar(400) NULL)
GO

CREATE TABLE [Order]([id] uniqueidentifier NOT NULL, [pid] uniqueidentifier NOT NULL)
GO

/****** Index: [uindex] ******/
CREATE UNIQUE INDEX [uindex] on [Person] ([id])
GO

/****** ForeignKey: [FK_Order_Person] ******/
ALTER TABLE [Order] ADD  CONSTRAINT [FK_Order_Person] FOREIGN KEY([pid])
REFERENCES [Person] ([id])
GO

```

You'll first notice that there is no PK on `[Person]`, only a unique index which allows me to create the foreign key reference to `[Person].[id]`.

`[INFORMATION_SCHEMA].[REFERENTIAL_CONSTRAINTS]` shows what I would expect: a row linking the foreign key name `[FK_Order_Person]` with the unique constraint name `[uindex]`.

So my question is: forced to use `INFORMATION_SCHEMA` in SQL Server Compact, where do I get the table and column information for index `[uindex]`? 

A join to `[KEY_COLUMN_USAGE]` yields nothing as I don't have a primary key.

In this example I could join to `[INFORMATION_SCHEMA].[INDEXES]`, but no rule enforces this name to be unique between table or schema's, so if another unique key exists by the same name, then I wouldn't be able to work out where this foreign key points.

Answer: 
Kuba,

Here's the syntax for converting a json array into a php associative array:

```
$my_array = '{"mode":"view","pid":"243","documentId":"193"}';
$new_array = json_decode($my_array,true);

echo $new_array['mode']; //return: view
echo $new_array['pid']; //return: 243
echo $new_array['documentId']; //return: 193

```

**var\_dump() result:**

```
array (size=3)
  'mode' => string 'view' (length=4)
  'pid' => string '243' (length=3)
  'documentId' => string '193' (length=3)

```
Ok, I've found the solution, after data serialization I've encoded string using base64\_encode and then push It in that form to other scripts. 

I still don't know why I had to encode it with base64, maybe because this string is used in javascript scripts and after that decoded in php?