За последние 24 часа нас посетили 17246 программистов и 1233 робота. Сейчас ищет 1341 программист ...

Выбрать данные

Тема в разделе "PHP для новичков", создана пользователем vodorod, 10 ноя 2012.

  1. vodorod

    vodorod Активный пользователь

    С нами с:
    10 янв 2011
    Сообщения:
    217
    Симпатии:
    0
    Подскажите, выбрать данные user => 190 Из вот этого var_dump():
    Код (Text):
    1.  
    2. object(CBframework)#363 (31) { ["_baseFramework"]=> &object(JSite)#3 (12) { ["template":"JSite":private]=> object(stdClass)#353 (4) { ["id"]=> string(3) "119" ["home"]=> string(1) "1" ["template"]=> string(8) "capital4" ["params"]=> object(JRegistry)#355 (1) { ["data":protected]=> object(stdClass)#354 (2) { ["siteTitle"]=> string(151) "Лучше получать по 1% от усилий 100 человек, чем 100% только от своих собственных усилий." ["siteSlogan"]=> string(14) " J. Paul Getty" } } } ["_language_filter":"JSite":private]=> bool(true) ["_detect_browser":"JSite":private]=> bool(false) ["_clientId":protected]=> int(0) ["_messageQueue":protected]=> array(0) { } ["_name":protected]=> string(4) "site" ["scope"]=> string(15) "com_comprofiler" ["requestTime"]=> string(16) "2012-11-10 07:59" ["startTime"]=> float(1352534384.4383) ["input"]=> object(JInput)#9 (4) { ["options":protected]=> array(0) { } ["filter":protected]=> object(JFilterInput)#10 (8) { ["tagsArray"]=> array(0) { } ["attrArray"]=> array(0) { } ["tagsMethod"]=> int(0) ["attrMethod"]=> int(0) ["xssAuto"]=> int(1) ["tagBlacklist"]=> array(22) { [0]=> string(6) "applet" [1]=> string(4) "body" [2]=> string(7) "bgsound" [3]=> string(4) "base" [4]=> string(8) "basefont" [5]=> string(5) "embed" [6]=> string(5) "frame" [7]=> string(8) "frameset" [8]=> string(4) "head" [9]=> string(4) "html" [10]=> string(2) "id" [11]=> string(6) "iframe" [12]=> string(6) "ilayer" [13]=> string(5) "layer" [14]=> string(4) "link" [15]=> string(4) "meta" [16]=> string(4) "name" [17]=> string(6) "object" [18]=> string(6) "script" [19]=> string(5) "style" [20]=> string(5) "title" [21]=> string(3) "xml" } ["attrBlacklist"]=> array(5) { [0]=> string(6) "action" [1]=> string(10) "background" [2]=> string(8) "codebase" [3]=> string(6) "dynsrc" [4]=> string(6) "lowsrc" } ["_errors":protected]=> array(0) { } } ["data":protected]=> &array(26) { ["option"]=> string(15) "com_comprofiler" ["task"]=> string(11) "userProfile" ["Itemid"]=> string(3) "625" ["user"]=> string(3) "190" ["lang"]=> string(2) "ru" ["05c38b7014490fb9c6c3d324e303c431"]=> string(5) "ru-RU" ["jpanesliders_content-sliders-78"]=> string(1) "0" ["jpanesliders_permissions-sliders-78"]=> string(1) "0" ["wf_editor_cb_services1_state"]=> string(1) "1" ["wf_editor_cb_services_state"]=> string(1) "1" ["TinyMCE_cb_services_size"]=> string(13) "cw=453&ch=126" ["cbrvs"]=> string(55) "cbrv1_fea44d5c8385b47646660b349519d50f_jHAGCkf6wy6k7PgX" ["configuration"]=> string(4) "site" ["jpanesliders_permissions-sliders"]=> string(1) "0" ["PHPSESSID"]=> string(32) "920e078df92560cb1cfb96e9a03cca32" ["jpanesliders_panel-sliders"]=> string(1) "0" ["jpanesliders_content-sliders-80"]=> string(1) "0" ["jpanesliders_permissions-sliders-80"]=> string(1) "0" ["jpanesliders_permissions-sliderscom_content"]=> string(1) "0" ["jpanesliders_module-sliders"]=> string(1) "0" ["jpanesliders_sliders"]=> string(1) "0" ["40ffb6383a997409bd5f8fa35a900584"]=> string(32) "a9527bd1c5b50a2653a8c9b641c74979" ["187b6a9c26bc09a7b67bed840cb72f10"]=> string(32) "6cb202ff13d3e6d808b13e2b57b62815" ["53088a54161b2f4304beccb8dcba9ada"]=> string(122) " 2 A 2 F4243 B 8 81210415510 856 9 346594A F 1 B4354575E5E5F145A10 A 8 F1B4050434147 A4054405D445E505E40 8 4 4 756 611 84A" ["language"]=> string(5) "ru-RU" ["view"]=> string(4) "blog" } ["inputs":protected]=> array(0) { } } ["_errors":protected]=> array(0) { } ["menu_associations"]=> string(1) "1" } ["_cmsDatabase"]=> &object(JDatabaseMySQL)#15 (19) { ["name"]=> string(5) "mysql" ["nameQuote":protected]=> string(1) "`" ["nullDate":protected]=> string(19) "0000-00-00 00:00:00" ["dbMinimum":protected]=> string(5) "5.0.4" ["_database":"JDatabase":private]=> string(14) "capitalgr_demo" ["connection":protected]=> resource(30) of type (mysql link) ["count":protected]=> int(0) ["cursor":protected]=> resource(268) of type (Unknown) ["debug":protected]=> bool(false) ["limit":protected]=> int(0) ["log":protected]=> array(0) { } ["offset":protected]=> int(0) ["sql":protected]=> string(132) "SELECT CONCAT(username,' (',id,')') AS mysqlfield FROM #__users WHERE id = (SELECT cb_distr FROM #__comprofiler WHERE user_id = 190)" ["tablePrefix":protected]=> string(4) "alu_" ["utf":protected]=> bool(true) ["errorNum":protected]=> int(0) ["errorMsg":protected]=> string(0) "" ["hasQuoted":protected]=> bool(false) ["quoted":protected]=> array(0) { } } ["_ui"]=> int(1) ["_now"]=> int(1352534384) ["_myId"]=> int(1) ["_myUsername"]=> string(5) "admin" ["_myUserType"]=> string(11) "Super Users" ["_myCmsGid"]=> NULL ["_myLanguage"]=> string(7) "russian" ["_myLanguageTag"]=> string(5) "ru-RU" ["acl"]=> object(CBACL)#366 (1) { ["_acl"]=> &object(JAccess)#198 (0) { } } ["_aclParams"]=> &array(9) { ["canEditUsers"]=> array(4) { [0]=> string(15) "com_comprofiler" [1]=> string(9) "core.edit" [2]=> string(5) "users" [3]=> NULL } ["canBlockUsers"]=> array(4) { [0]=> string(15) "com_comprofiler" [1]=> string(15) "core.edit.state" [2]=> string(5) "users" [3]=> NULL } ["canReceiveAdminEmails"]=> array(4) { [0]=> string(15) "com_comprofiler" [1]=> string(10) "core.admin" [2]=> string(5) "users" [3]=> NULL } ["canEditOwnContent"]=> array(6) { [0]=> string(11) "com_content" [1]=> string(13) "core.edit.own" [2]=> string(5) "users" [3]=> NULL [4]=> string(7) "content" [5]=> string(3) "own" } ["canAddAllContent"]=> array(6) { [0]=> string(11) "com_content" [1]=> string(11) "core.create" [2]=> string(5) "users" [3]=> NULL [4]=> string(7) "content" [5]=> string(3) "all" } ["canEditAllContent"]=> array(6) { [0]=> string(11) "com_content" [1]=> string(9) "core.edit" [2]=> string(5) "users" [3]=> NULL [4]=> string(7) "content" [5]=> string(3) "all" } ["canPublishContent"]=> array(6) { [0]=> string(11) "com_content" [1]=> string(15) "core.edit.state" [2]=> string(5) "users" [3]=> NULL [4]=> string(7) "content" [5]=> string(3) "all" } ["canInstallPlugins"]=> array(4) { [0]=> string(13) "com_installer" [1]=> string(11) "core.manage" [2]=> string(5) "users" [3]=> NULL } ["canManageUsers"]=> array(4) { [0]=> string(15) "com_comprofiler" [1]=> string(11) "core.manage" [2]=> string(5) "users" [3]=> NULL } } ["_cmsSefFunction"]=> array(2) { [0]=> string(6) "JRoute" [1]=> string(1) "_" } ["_sefFuncHtmlEnt"]=> NULL ["_cmsUserClassName"]=> string(5) "JUser" ["_cmsUserNeedsDb"]=> bool(false) ["_cmsRedirectFunction"]=> array(2) { [0]=> object(JSite)#3 (12) { ["template":"JSite":private]=> object(stdClass)#353 (4) { ["id"]=> string(3) "119" ["home"]=> string(1) "1" ["template"]=> string(8) "capital4" ["params"]=> object(JRegistry)#355 (1) { ["data":protected]=> object(stdClass)#354 (2) { ["siteTitle"]=> string(151) "Лучше получать по 1% от усилий 100 человек, чем 100% только от своих собственных усилий." ["siteSlogan"]=> string(14) " J. Paul Getty" } } } ["_language_filter":"JSite":private]=> bool(true) ["_detect_browser":"JSite":private]=> bool(false) ["_clientId":protected]=> int(0) ["_messageQueue":protected]=> array(0) { } ["_name":protected]=> string(4) "site" ["scope"]=> string(15) "com_comprofiler" ["requestTime"]=> string(16) "2012-11-10 07:59" ["startTime"]=> float(1352534384.4383) ["input"]=> object(JInput)#9 (4) { ["options":protected]=> array(0) { } ["filter":protected]=> object(JFilterInput)#10 (8) { ["tagsArray"]=> array(0) { } ["attrArray"]=> array(0) { } ["tagsMethod"]=> int(0) ["attrMethod"]=> int(0) ["xssAuto"]=> int(1) ["tagBlacklist"]=> array(22) { [0]=> string(6) "applet" [1]=> string(4) "body" [2]=> string(7) "bgsound" [3]=> string(4) "base" [4]=> string(8) "basefont" [5]=> string(5) "embed" [6]=> string(5) "frame" [7]=> string(8) "frameset" [8]=> string(4) "head" [9]=> string(4) "html" [10]=> string(2) "id" [11]=> string(6) "iframe" [12]=> string(6) "ilayer" [13]=> string(5) "layer" [14]=> string(4) "link" [15]=> string(4) "meta" [16]=> string(4) "name" [17]=> string(6) "object" [18]=> string(6) "script" [19]=> string(5) "style" [20]=> string(5) "title" [21]=> string(3) "xml" } ["attrBlacklist"]=> array(5) { [0]=> string(6) "action" [1]=> string(10) "background" [2]=> string(8) "codebase" [3]=> string(6) "dynsrc" [4]=> string(6) "lowsrc" } ["_errors":protected]=> array(0) { } } ["data":protected]=> &array(26) { ["option"]=> string(15) "com_comprofiler" ["task"]=> string(11) "userProfile" ["Itemid"]=> string(3) "625" ["user"]=> string(3) "190" ["lang"]=> string(2) "ru" ["05c38b7014490fb9c6c3d324e303c431"]=> string(5) "ru-RU" ["jpanesliders_content-sliders-78"]=> string(1) "0" ["jpanesliders_permissions-sliders-78"]=> string(1) "0" ["wf_editor_cb_services1_state"]=> string(1) "1" ["wf_editor_cb_services_state"]=> string(1) "1" ["TinyMCE_cb_services_size"]=> string(13) "cw=453&ch=126" ["cbrvs"]=> string(55) "cbrv1_fea44d5c8385b47646660b349519d50f_jHAGCkf6wy6k7PgX" ["configuration"]=> string(4) "site" ["jpanesliders_permissions-sliders"]=> string(1) "0" ["PHPSESSID"]=> string(32) "920e078df92560cb1cfb96e9a03cca32" ["jpanesliders_panel-sliders"]=> string(1) "0" ["jpanesliders_content-sliders-80"]=> string(1) "0" ["jpanesliders_permissions-sliders-80"]=> string(1) "0" ["jpanesliders_permissions-sliderscom_content"]=> string(1) "0" ["jpanesliders_module-sliders"]=> string(1) "0" ["jpanesliders_sliders"]=> string(1) "0" ["40ffb6383a997409bd5f8fa35a900584"]=> string(32) "a9527bd1c5b50a2653a8c9b641c74979" ["187b6a9c26bc09a7b67bed840cb72f10"]=> string(32) "6cb202ff13d3e6d808b13e2b57b62815" ["53088a54161b2f4304beccb8dcba9ada"]=> string(122) " 2 A 2 F4243 B 8 81210415510 856 9 346594A F 1 B4354575E5E5F145A10 A 8 F1B4050434147 A4054405D445E505E40 8 4 4 756 611 84A" ["language"]=> string(5) "ru-RU" ["view"]=> string(4) "blog" } ["inputs":protected]=> array(0) { } } ["_errors":protected]=> array(0) { } ["menu_associations"]=> string(1) "1" } [1]=> string(8) "redirect" } ["_cbUrlRouting"]=> array(1) { ["option"]=> string(15) "com_comprofiler" } ["_getVarFunction"]=> array(2) { [0]=> string(8) "JRequest" [1]=> string(6) "getVar" } ["_outputCharset"]=> string(5) "UTF-8" ["_editorDisplay"]=> array(3) { ["display"]=> array(2) { ["call"]=> array(2) { [0]=> object(JEditor)#364 (8) { ["_observers":protected]=> array(0) { } ["_state":protected]=> NULL ["_methods":protected]=> array(0) { } ["_editor":protected]=> NULL ["_name":protected]=> string(3) "jce" ["asset":protected]=> NULL ["author":protected]=> NULL ["_errors":protected]=> array(0) { } } [1]=> string(7) "display" } ["args"]=> string(4) "noid" } ["save"]=> array(2) { ["call"]=> array(2) { [0]=> object(JEditor)#364 (8) { ["_observers":protected]=> array(0) { } ["_state":protected]=> NULL ["_methods":protected]=> array(0) { } ["_editor":protected]=> NULL ["_name":protected]=> string(3) "jce" ["asset":protected]=> NULL ["author":protected]=> NULL ["_errors":protected]=> array(0) { } } [1]=> string(4) "save" } ["args"]=> string(4) "noid" } ["returns"]=> bool(true) } ["_redirectUrl"]=> NULL ["_redirectMessage"]=> NULL ["_redirectMessageType"]=> string(7) "message" ["document"]=> object(CBdocumentHtml)#365 (5) { ["_output"]=> string(4) "html" ["_head"]=> array(7) { ["metaTags"]=> array(0) { } ["linksCustom"]=> array(0) { } ["stylesheets"]=> array(0) { } ["styles"]=> array(0) { } ["scriptsUrl"]=> array(2) { ["http://capitalgr.tmweb.ru/components/com_comprofiler/js/menubest.min.js?v=496084efe1bdcea1"]=> array(5) { ["pre"]=> NULL ["post"]=> NULL ["preC"]=> NULL ["postC"]=> NULL ["type"]=> string(15) "text/javascript" } ["http://capitalgr.tmweb.ru/components/com_comprofiler/js/overlib_all_mini.js?v=496084efe1bdcea1"]=> array(5) { ["pre"]=> NULL ["post"]=> string(211) "overlib_pagedefaults(WIDTH,250,VAUTO,RIGHT,AUTOSTATUSCAP, CSSCLASS,TEXTFONTCLASS,'cb-tips-font',FGCLASS,'cb-tips-fg',BGCLASS,'cb-tips-bg',CAPTIONFONTCLASS,'cb-tips-capfont', CLOSEFONTCLASS, 'cb-tips-closefont');" ["preC"]=> NULL ["postC"]=> NULL ["type"]=> string(15) "text/javascript" } } ["scripts"]=> array(1) { ["text/javascript"]=> array(1) { [0]=> string(244) " function cbConnSubmReq() { cClick(); document.connOverForm.submit(); } function confirmSubmit() { if (confirm("Вы действительно хотите удалить эту связь?")) return true ; else return false ; } " } } ["custom"]=> array(0) { } } ["_cmsDoc"]=> object(JDocumentHTML)#343 (31) { ["_links"]=> array(0) { } ["_custom"]=> array(0) { } ["template"]=> NULL ["baseurl"]=> NULL ["params"]=> NULL ["_file"]=> NULL ["_template":protected]=> string(0) "" ["_template_tags":protected]=> array(0) { } ["_caching":protected]=> NULL ["title"]=> string(4) "krus" ["description"]=> NULL ["link"]=> string(0) "" ["base"]=> string(0) "" ["language"]=> string(5) "ru-ru" ["direction"]=> string(3) "ltr" ["_generator"]=> string(40) "Joomla! - Open Source Content Management" ["_mdate"]=> string(0) "" ["_tab"]=> string(2) " " ["_lineEnd"]=> string(1) " " ["_charset"]=> string(5) "utf-8" ["_mime"]=> string(9) "text/html" ["_namespace"]=> string(0) "" ["_profile"]=> string(0) "" ["_scripts"]=> array(3) { ["http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"]=> array(3) { ["mime"]=> string(15) "text/javascript" ["defer"]=> bool(false) ["async"]=> bool(false) } ["plugins/content/soccomments/soc/js/jquery-ui-1.8.16.custom.min.js"]=> array(3) { ["mime"]=> string(15) "text/javascript" ["defer"]=> bool(false) ["async"]=> bool(false) } ["plugins/content/soccomments/soc/js/jsoccomments.js"]=> array(3) { ["mime"]=> string(15) "text/javascript" ["defer"]=> bool(false) ["async"]=> bool(false) } } ["_script"]=> array(0) { } ["_styleSheets"]=> array(2) { ["plugins/content/soccomments/soc/css/soccomments.css"]=> array(3) { ["mime"]=> string(8) "text/css" ["media"]=> NULL ["attribs"]=> array(0) { } } ["http://capitalgr.tmweb.ru/components/com_comprofiler/plugin/templates/default/template.css"]=> array(3) { ["mime"]=> string(8) "text/css" ["media"]=> NULL ["attribs"]=> array(0) { } } } ["_style"]=> array(0) { } ["_metaTags"]=> array(2) { ["http-equiv"]=> array(1) { ["content-type"]=> string(9) "text/html" } ["standard"]=> array(2) { ["keywords"]=> NULL ["rights"]=> NULL } } ["_engine"]=> NULL ["_type"]=> string(4) "html" ["_errors":protected]=> array(0) { } } ["_headsOutputed"]=> bool(false) ["_direction"]=> string(3) "ltr" } ["_jsCodes"]=> array(0) { } ["_jQueryCodes"]=> array(3) { [0]=> string(337) "var cbshowtabsArray = new Array(); function showCBTab( sName ) { if ( typeof(sName) == 'string' ) { sName = sName.toLowerCase(); } for (var i=0;i string(223) "var tabPanecb_right = new WebFXTabPane(document.getElementById("cb_right"),false); var tabPanecb_right; cbshowtabsArray.push( [['Личные данные','11','getcontacttab'],'tabPanecb_right.setSelectedIndex( 0 );'] ); " [2]=> string(438) "var tabPanecb_tabmain = new WebFXTabPane(document.getElementById("cb_tabmain"),false); var tabPanecb_tabmain; cbshowtabsArray.push( [['Дистрибьюторы','37','getdistr'],'tabPanecb_tabmain.setSelectedIndex( 0 );'] ); cbshowtabsArray.push( [['Блог','23','gethekimablogtab'],'tabPanecb_tabmain.setSelectedIndex( 1 );'] ); cbshowtabsArray.push( [['Форум','13','getforumtab'],'tabPanecb_tabmain.setSelectedIndex( 2 );'] ); " } ["_jQueryPlugins"]=> array(1) { ["cb_webfxtabs"]=> string(41) "/components/com_comprofiler/js/tabpane.js" } ["_jQueryPluginsSent"]=> array(0) { } ["_jqueryDependencies"]=> array(2) { ["flot"]=> array(1) { [1]=> array(1) { [0]=> string(8) "excanvas" } } ["rating"]=> array(1) { [-1]=> array(1) { [0]=> string(8) "metadata" } } } ["_jqueryCssFiles"]=> array(2) { ["slimbox2"]=> array(1) { ["lightbox.css"]=> array(2) { [0]=> bool(false) [1]=> string(6) "screen" } } ["ui-all"]=> array(1) { ["jqueryui/ui.all.css"]=> array(2) { [0]=> bool(false) [1]=> NULL } } } }
     
  2. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    из исходных кодов страницы надо такое брать или предварительно обрамлять тегами <pre>

    никто не будет ковыряться в этой каше чтобы тебе помочь к сожалению, ибо это не реально
     
  3. Gold Dragon

    Gold Dragon Активный пользователь

    С нами с:
    30 сен 2012
    Сообщения:
    306
    Симпатии:
    2
    Адрес:
    Тамбов
    Код (PHP):
    1. echo '<pre>';
    2. var_dump($variable);
    3. echo '</pre>'; 
     
  4. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
  5. Gold Dragon

    Gold Dragon Активный пользователь

    С нами с:
    30 сен 2012
    Сообщения:
    306
    Симпатии:
    2
    Адрес:
    Тамбов
    да просто к твоим словам код добавил для наглядности :)
     
  6. Your

    Your Старожил

    С нами с:
    2 июл 2011
    Сообщения:
    4.074
    Симпатии:
    7
    не понял.

    $array['user'] это?
     
  7. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    что типа тег надо закрывать, а я об этом не написал? =)
     
  8. Gold Dragon

    Gold Dragon Активный пользователь

    С нами с:
    30 сен 2012
    Сообщения:
    306
    Симпатии:
    2
    Адрес:
    Тамбов
    ))))

    Добавлено спустя 56 секунд:
    а вообще если открыть код страницы без PRE, то коде всё будет красиво =)
     
  9. igordata

    igordata Суперстар
    Команда форума Модератор

    С нами с:
    18 мар 2010
    Сообщения:
    32.408
    Симпатии:
    1.768
    К слову, установка xdebug решает этот вопрос раз и навсегда, ибо порождает валидный цветной html-код в таких случаях.