Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mystring = "1";
- $myarray = array();
- $myarray[(string)$mystring] = "my content of a key which is supposed to be STRING!!!";
- var_dump($myarray);
- RESULT
- ------
- array(1) {
- [1]=>
- string(53) "my content of a key which is supposed to be STRING!!!"
- }
- YES! the key is integer, FOR FUCK's SAKE, THANK YOU PHP!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement