'I can't debug whats wrong with my ACF get_field() to display an image array's url value

So my code is pretty straightforward. I am just getting a field value from the global fields (Options). So this field is on Dashboard -> Options (I have ACFpro) and I am trying to echo out a logo which is an image array.

This is how my code looks like

                <ul class="text-white p-0">
                    <a class="brand " href="/">
                        <?php
                           $image = get_field('logo');
                           echo '<p id="debug">'.($image ['url']).'</p>';
                        ?>
                    </a>
                </ul>

al i am trying to do is pull the url value and insert it to a <p> tag just to make sure it pulls the right value. but instead I am getting this error.

error when trying to echo $image

Any idea on what am I doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source