Use array_keys.
$keys = array_keys($my_arr);
$my_arr[$keys[1]] = "not so much bling";
More Related Contents:
- Echo in echo [duplicate]
- Laravel 5 – How to access image uploaded in storage within View?
- How to remove all non printable characters in a string?
- PHP shell_exec() vs exec()
- Create Word Document using PHP in Linux [closed]
- Execute PHP script in cron job
- PHP json_encode encoding numbers as strings
- Creating PHP class instance with a string
- PHPUnit assert that an exception was thrown?
- Two-way encryption in PHP
- PHP: multiple SQL queries in one mysql_query statement
- php return only duplicated entries from an array
- cURL , get redirect url to a variable
- Message: Trying to access array offset on value of type null [duplicate]
- Relative path not working in cron PHP script
- curl and ping – how to check whether a website is either up or down?
- Get the First or Last Friday in a Month
- change the date format in laravel view page [duplicate]
- How to join two tables with ssp.class.php
- Is there a built-in function or plugin to handle date formatting in JavaScript?
- Convert clickable anchor tags to plain text in html document
- How can I add all of my array values together in PHP?
- Is there a BigInteger class in PHP?
- Timeout a function in PHP
- Switching between HTTP and HTTPS pages with secure session-cookie
- comma-separated string to array
- definitive way to get user ip address php [duplicate]
- Getting first weekday in a month with strtotime
- Escape HTML to PHP or Use Echo? Which is better?
- How do I detect non-ASCII characters in a string?