<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[גישה לערכים במערך PHP]]></title><description><![CDATA[<p dir="auto">יש לי מערך (שהדפסתי אותו עם print_r) <strong>שהחלק הראשון שלו</strong> הוא כדלהלן:</p>
<pre><code>XF\Entity\Post Object
(
    [_uniqueEntityId:XF\Mvc\Entity\Entity:private] =&gt; 9
    [rootClass:protected] =&gt; XF\Entity\Post
    [_useReplaceInto:protected] =&gt; 
    [_newValues:protected] =&gt; Array
        (
        )

    [_values:protected] =&gt; Array
        (
            [post_id] =&gt; 1262
            [thread_id] =&gt; 288
            [user_id] =&gt; 4
            [username] =&gt; chagold
            [post_date] =&gt; 1584230524
            [message] =&gt; s
            [ip_id] =&gt; 4327
            [message_state] =&gt; visible
            [attach_count] =&gt; 0
            [position] =&gt; 0
            [likes] =&gt; 0
            [like_users] =&gt; a:0:{}
            [warning_id] =&gt; 0
            [warning_message] =&gt; 
            [last_edit_date] =&gt; 0
            [last_edit_user_id] =&gt; 0
            [edit_count] =&gt; 0
            [embed_metadata] =&gt; []
        )

    [_relations:protected] =&gt; Array
        (
            [Thread] =&gt; BoardOfProfessionals\XF\Entity\Thread Object
                (
                    [_uniqueEntityId:XF\Mvc\Entity\Entity:private] =&gt; 8
                    [rootClass:protected] =&gt; XF\Entity\Thread
                    [_useReplaceInto:protected] =&gt; 
                    [_newValues:protected] =&gt; Array
                        (
                        )

                    [_values:protected] =&gt; Array
                        (
                            [thread_id] =&gt; 288
                            [node_id] =&gt; 141
                            [title] =&gt; s
                            [reply_count] =&gt; 0
                            [view_count] =&gt; 0
                            [user_id] =&gt; 4
                            [username] =&gt; chagold
                            [post_date] =&gt; 1584230524
                            [sticky] =&gt; 0
                            [discussion_state] =&gt; visible
                            [discussion_open] =&gt; 1
                            [discussion_type] =&gt; 
                            [first_post_id] =&gt; 1262
                            [first_post_likes] =&gt; 0
                            [last_post_date] =&gt; 1584230524
                            [last_post_id] =&gt; 1262
                            [last_post_user_id] =&gt; 4
                            [last_post_username] =&gt; chagold
                            [prefix_id] =&gt; 0
                            [tags] =&gt; a:0:{}
                            [custom_fields] =&gt; a:0:{}
                            [demo_portal_featured] =&gt; 0
                            [BoardOfProfessionals_featured] =&gt; 1
                            [TagsToBoardOfProfessionals] =&gt; הנהלת חשבונות
                        )

       
</code></pre>
<p dir="auto">איך אני ניגש לערך node_id שנמצא מתחת _relations:protected<br />
?</p>
]]></description><link>https://tchumim.com/topic/8125/גישה-לערכים-במערך-php</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 18:08:10 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/8125.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 15 Mar 2020 00:23:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to גישה לערכים במערך PHP on Sun, 15 Mar 2020 18:47:40 GMT]]></title><description><![CDATA[<p dir="auto">זה מערך בתוך אובייקט, צריך לגשת לקרביים של האובייקט ב-</p>
<pre><code>-&gt;
</code></pre>
<p dir="auto">ולהמשיך כרגיל</p>
<p dir="auto">בסה"כ זה אמור להיות כך</p>
<pre><code>$obyect -&gt; _relations:protected["Thread"]-&gt;_values:protected["node_id"];
</code></pre>
<p dir="auto">אם זה לא עובד, תוכל להשתמש ב-</p>
<pre><code>var_dump();
</code></pre>
<p dir="auto">בכדי לקבל את המידע איזה סוג אובייקט הוא כל חלק בפלט דלעיל</p>
]]></description><link>https://tchumim.com/post/94912</link><guid isPermaLink="true">https://tchumim.com/post/94912</guid><dc:creator><![CDATA[איש נחמד]]></dc:creator><pubDate>Sun, 15 Mar 2020 18:47:40 GMT</pubDate></item><item><title><![CDATA[Reply to גישה לערכים במערך PHP on Sun, 15 Mar 2020 09:11:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chagold">@<bdi>chagold</bdi></a><br />
אתה כותב את המילה אחרי הנקודתיים גם? (זה לא חלק משם המפתח)<br />
אצלי זה עובד (כשדימיתי משהו לקוד שלך).</p>
<p dir="auto">דוגמא<br />
<a href="https://paiza.io/projects/q-WlCUIhvP1-4UZlq1MmeQ" target="_blank" rel="noopener noreferrer nofollow ugc">https://paiza.io/projects/q-WlCUIhvP1-4UZlq1MmeQ</a></p>
]]></description><link>https://tchumim.com/post/94881</link><guid isPermaLink="true">https://tchumim.com/post/94881</guid><dc:creator><![CDATA[ש.ב.ח.]]></dc:creator><pubDate>Sun, 15 Mar 2020 09:11:24 GMT</pubDate></item><item><title><![CDATA[Reply to גישה לערכים במערך PHP on Sun, 15 Mar 2020 08:54:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chagold">@<bdi>chagold</bdi></a> אמר ב<a href="/post/94858">גישה לערכים במערך PHP</a>:</p>
<blockquote>
<p dir="auto">_values:protected</p>
</blockquote>
<p dir="auto">לא עובד.</p>
]]></description><link>https://tchumim.com/post/94878</link><guid isPermaLink="true">https://tchumim.com/post/94878</guid><dc:creator><![CDATA[chagold]]></dc:creator><pubDate>Sun, 15 Mar 2020 08:54:36 GMT</pubDate></item><item><title><![CDATA[Reply to גישה לערכים במערך PHP on Sun, 15 Mar 2020 08:01:00 GMT]]></title><description><![CDATA[<p dir="auto">שים לב שמה שהדפסת הוא אובייקט ולא מערך רגיל, בתוכו יש מערכים וגםם הם יכולים להיות אובייקטים או שהם מחזיקים אובייקטים<br />
למערך יש לגשת עם סוגריים מרובעות ואילו לאובייקט יש לגשת עם חץ.<br />
כך שבמקרה דנן נראה שתצטרך לכך</p>
<pre><code>NAME_OBJ-&gt; _relations['Thread']-&gt;_values['node_id'];
</code></pre>
]]></description><link>https://tchumim.com/post/94876</link><guid isPermaLink="true">https://tchumim.com/post/94876</guid><dc:creator><![CDATA[ש.ב.ח.]]></dc:creator><pubDate>Sun, 15 Mar 2020 08:01:00 GMT</pubDate></item></channel></rss>