How can I write this code in one php statement?
$menu = theme('nice_menu', 1, 10, 'down'); print $menu['content'];
Something like that:
print theme('nice_menu', 1, 10, 'down')['content'];
Not on a production version of PHP. This is added to the trunk for the next version (currently called 5.3.99DEV, but she doesn’t know if it will be 5.4 or 6.0 or what) ... This is called Array dereferencing. See RFP ...
This, unfortunately, is not possible (in the current state of PHP). Your first example is a way to do this.
Source: https://habr.com/ru/post/1759926/More articles:Сохранение кода на одном уровне при работе со статическими методами - javaIs there a way to run multiple Grails applications on the same web server without PermGen errors? - permgenXSLT with overlapping elements? - xmlC ++ "Variable not declared in this scope" - again - c ++How to display a custom object under the "Extensions" tab in the workplace? - dynamics-crmgetFirstVisiblePosition () returns an invalid value in the gallery window - androidОбщий вопрос... Вызов статического метода из общего класса - genericsError converting replication from SVN to Eclipse to Android project - androidhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1759930/how-do-i-find-near-by-locations-to-a-given-location-using-google-map-api&usg=ALkJrhjPeJ88Bw0lYviaMbEA-dVSZf0hUQCD replacement delphi 2005, where to find? - delphiAll Articles